-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(windows): Expose webview2 zoom hotkeys from wry #9352
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few documentation nitpicks. You will need to regenerate the schema file.
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
Can we use WebView::zoom to manually implement this feature on macOS/Linux? |
This PR is for only allowing users to enable the builtin one on Webview2, we need another PR to expose WebView::zoom and users can create a UI for it themselves. |
hmm actually this doesn't enable any UI, just the hotkeys, maybe we can indeed emulate the behavior on other platforms and also expose WebView::zoom at the same time @Legend-Master would you like to add that too in this PR? |
I think it's fine to expose the webview2 one first in this pr (it's in the webview2 api but we don't have a way to use it), and expose zoom function and polyfill for this functionality in another pr If we want to put them in a single pr, I can take a look tomorrow, but I'm not familiar with WebKit zoom controls (is it the same as Chromium?) And emulating it would be injecting some JavaScript to the webview? |
let's make them in another PR.
Yeah should be the same keys,
yeah, take a look at https://github.com/tauri-apps/tauri/blob/36b4c12497fbe636066f4848c6877b3ab6cc892e/core/tauri/src/webview/scripts/toggle-devtools.js |
Seems like webview2's zoom popup is disabled without a way to getting it back MicrosoftEdge/WebView2Feedback#95 (comment), also the zoom factor is not persisted across page load (reset to 100% on reload/restart), pretty sad that webview2's zoom control is a downgraded version of the browser zoom control 😥 I'll take a look at exposing |
Reference: #3310