Chrome subscribes events from [InputPane](https://learn.microsoft.com/en-us/uwp/api/windows.ui.viewmanagement.inputpane?view=winrt-22621) API and adjust the content window based on the size of the keyboard without resizing the whole window and the viewport size. Firefox does not, and Windows resizes the window when showing the onscreen keyboard, thus affects the viewport size, triggering UI transition depending on CSS media rules of the pages. See the behavior difference: 1. Open https://codepen.io/aymak/pen/BaqqWZe 2. Tap the address bar or any input box in the page (the latter currently somehow does not open the onscreen keyboard on Firefox but does on Chrome) 3. See what happens when the onscreen keyboard opens The way to prevent window resize is not well-documented, and it seems merely subscribing Showing event implicitly prevents that. Try adding this in OSKInputPaneManager.cpp's [GetInputPane](https://searchfox.org/mozilla-central/rev/065102493dfc49234120c37fc6a334a5b1d86d9e/widget/windows/OSKInputPaneManager.cpp#26-44). ```cpp auto completedCallback = Callback<ABI::Windows::Foundation::ITypedEventHandler< InputPane*, InputPaneVisibilityEventArgs*>>( [](IInputPane* aPane, IInputPaneVisibilityEventArgs* aArgs) -> HRESULT { return S_OK; }); EventRegistrationToken token; inputPane->add_Showing(completedCallback.Get(), &token); ```
Bug 1834394 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Chrome subscribes events from [InputPane](https://learn.microsoft.com/en-us/uwp/api/windows.ui.viewmanagement.inputpane?view=winrt-22621) API and adjust the content window based on the size of the keyboard without resizing the whole window and the viewport size. Firefox does not, and Windows resizes the window when showing the onscreen keyboard, thus affects the viewport size, triggering UI transition depending on CSS media rules of the pages. See the behavior difference: 1. Open https://codepen.io/aymak/pen/BaqqWZe 2. Tap the address bar or any input box in the page (the latter currently somehow does not open the onscreen keyboard on Firefox but does on Chrome) 3. See what happens when the onscreen keyboard opens The way to prevent window resize is not well-documented, and it seems merely subscribing Showing event implicitly prevents that. (Edit: There needs to be more work to trigger proper scrolling, of course.) Try adding this in OSKInputPaneManager.cpp's [GetInputPane](https://searchfox.org/mozilla-central/rev/065102493dfc49234120c37fc6a334a5b1d86d9e/widget/windows/OSKInputPaneManager.cpp#26-44). ```cpp auto completedCallback = Callback<ABI::Windows::Foundation::ITypedEventHandler< InputPane*, InputPaneVisibilityEventArgs*>>( [](IInputPane* aPane, IInputPaneVisibilityEventArgs* aArgs) -> HRESULT { return S_OK; }); EventRegistrationToken token; inputPane->add_Showing(completedCallback.Get(), &token); ```