Skip to content

Fix click-to-copy on Safari#3621

Merged
emilk merged 1 commit intomasterfrom
emilk/fix-click-to-copy-on-safari
Nov 24, 2023
Merged

Fix click-to-copy on Safari#3621
emilk merged 1 commit intomasterfrom
emilk/fix-click-to-copy-on-safari

Conversation

@emilk
Copy link
Copy Markdown
Owner

@emilk emilk commented Nov 24, 2023

Follow-up to #3513

Safari only allows access to the clipboard as response to user action, so we need to take an extra logic step right in the event handler.

@emilk emilk added bug Something is broken eframe Relates to epi and eframe web Related to running Egui on the web labels Nov 24, 2023
@emilk emilk merged commit 0d24a3a into master Nov 24, 2023
@emilk emilk deleted the emilk/fix-click-to-copy-on-safari branch November 24, 2023 08:06
emilk added a commit that referenced this pull request Nov 24, 2023
* Follow-up to #3621 and
#3513

To work around a Safari limitation, we run the app logic in the event
handler of copy, cut, and mouse up and down.

Previously the output of that frame was discarded, but in this PR it is
now saved to be used in the next requestAnimationFrame.

The result is noticeable more distinct clicks on buttons (one more frame
of highlight)

Bonus: also fix auto-save of a sleeping web app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is broken eframe Relates to epi and eframe web Related to running Egui on the web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copy button doesn't work on Safari

1 participant