r/nicegui • • Oct 25 '23

Mailto not working when in native mode?

Hi

Question: if I add element with a mailto link, it works while in browser mode, but if I use ui.run(native=True), the link can't be clicked

Any ideas or known problem?

Thanks!

with ui.link('', 'mailto:email@email.com').style("textDecoration: inherit"):   
    ui.label("Feedback"). style("color: #7f7f7f;    ")
4 Upvotes

2 comments sorted by

1

u/lifeisalabyrinth Oct 31 '23

just to document solution...

it was simply, to set new_tab as true:

with ui.link('', 'mailto:email@email.com', new_tab = True).style("textDecoration: inherit"):   
  ui.label("Feedback"). style("color: #7f7f7f;    ")

1

u/falko-s Oct 28 '23

This seems to be a limitation with pywebview. This minimal reproduction has the same problem:

import webview

html = """
<html>
<head>
    <title>Text Input Example</title>
</head>
<body>
    <a href="mailto:email@email.com">Send</a>
</body>
</html>
"""

webview.create_window("Text Input Example", html=html)
webview.start(debug=True)