lampsitter / egui_commonmark

Markdown viewer for egui
Apache License 2.0
82 stars 19 forks source link

Copy button doesn't work on Safari #21

Closed abey79 closed 10 months ago

abey79 commented 10 months ago

Safari has a marked tendency of rejecting copy operations that it can't link to user action. For this reason, most copy operations used to fail on Safari with egui/wasm. This was recently fixed in egui 0.24 (https://github.com/emilk/egui/pull/3513), and now copying from code blocks works when selecting text and copy. However it still fails when using the copy button.

Here is a dev build of Rerun based on egui 0.24 where select-and-copy works on Safari, but not the copy button:

https://demo.rerun.io/pr/4111/examples/structure_from_motion/

One must scroll down the description view to reach a code block:

image

Clicking the "Copy" button fails with this error:

image

For reference, this is another dev build that is based on egui 0.23 and where all forms of copying fail:

https://demo.rerun.io/pr/4324/examples/structure_from_motion/

emilk commented 10 months ago

The problem is in eframe: https://github.com/emilk/egui/pull/3513 fixed copy/cut when using keyboard shortcuts, but not when using the mouse buttons. I can make a patch release to fix it.

abey79 commented 10 months ago

Fixed by https://github.com/emilk/egui/pull/3621