You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context : Win32/Win64 SDK application.
Webview2 official runtime 126, 127.
the shortcuts :
Ctrl+'+' (zoom+),
Ctrl+'-' (zoom-),
Ctrl+'0' (reset zoom to 100%)
work well, BUT I discovered than if after I refresh/reload the page, the zoom modified by these shortcuts is ... LOST (the zoom revert to old value, see the Webview2APISample).
So (after some little brainstorming) to solve this (little strange) problem
I added this code into the event ZoomFactorChanged :
double z;
if (SUCCEEDED(webviewController->get_ZoomFactor(&z)))
{
webviewController->put_ZoomFactor(z);
}
and with this, now when I refresh the page, the zoom modified by the shortcuts don't change (better !).
But another more strange problem occur : now the shortcut Ctrl+'0' (zoom reset) don't WORK anymore !
(So I have to write the code to reset the zoom);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Context : Win32/Win64 SDK application.
Webview2 official runtime 126, 127.
the shortcuts :
Ctrl+'+' (zoom+),
Ctrl+'-' (zoom-),
Ctrl+'0' (reset zoom to 100%)
work well, BUT I discovered than if after I refresh/reload the page, the zoom modified by these shortcuts is ... LOST (the zoom revert to old value, see the Webview2APISample).
So (after some little brainstorming) to solve this (little strange) problem
I added this code into the event ZoomFactorChanged :
double z;
if (SUCCEEDED(webviewController->get_ZoomFactor(&z)))
{
webviewController->put_ZoomFactor(z);
}
and with this, now when I refresh the page, the zoom modified by the shortcuts don't change (better !).
But another more strange problem occur : now the shortcut Ctrl+'0' (zoom reset) don't WORK anymore !
(So I have to write the code to reset the zoom);
Anybody has an idea/explanation ?
Beta Was this translation helpful? Give feedback.
All reactions