Skip to content

eframe web: Don't throw away frames on click/copy/cut #3623

Merged
emilk merged 3 commits intomasterfrom
emilk/dont-throw-away-frames
Nov 24, 2023
Merged

eframe web: Don't throw away frames on click/copy/cut #3623
emilk merged 3 commits intomasterfrom
emilk/dont-throw-away-frames

Conversation

@emilk
Copy link
Copy Markdown
Owner

@emilk emilk commented Nov 24, 2023

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

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)
@emilk emilk added bug Something is broken web Related to running Egui on the web eframe Relates to epi and eframe labels Nov 24, 2023
@emilk emilk merged commit 23732be into master Nov 24, 2023
@emilk emilk deleted the emilk/dont-throw-away-frames branch November 24, 2023 09:08
emilk added a commit that referenced this pull request Nov 27, 2023
Closes #3633

Bug introduced in #3623 (after 0.24.0 was cut)
@emilk emilk mentioned this pull request Nov 27, 2023
emilk added a commit that referenced this pull request Nov 27, 2023
Closes #3633

Bug introduced in #3623 (after 0.24.0 was cut)
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.

1 participant