Support preventScroll for element.focus on GeckoView
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | affected |
People
(Reporter: m_kato, Unassigned)
References
Details
When using element.focus(), Fennec and GeckoView will scroll content page via APZC for zoom to input after showing software keyboard.
I guess that we may require additional flags for nsIWidget::SetInputContext.
Also, this option doesn't work on Chrome/Android. (https://bugs.chromium.org/p/chromium/issues/detail?id=953169).
Reporter | ||
Comment 1•5 years ago
|
||
Yesterday, I already chat with Mirko about this issue. Since Chrome/Android is also broken, so this doesn't become webcompat issue until they fixes it.
Comment 2•5 years ago
•
|
||
To give more context, it seems that GeckoEditable.icNotifyIME calls GeckoEditable.softInput, which calls GeckoViewContentChild.receiveMessage, which calls nsDOMWindowUtils.ZoomToFocusedInput which also scrolls to the element. At the latter place, scrolling needs to be prevented. The place could probably be notified by using a new flag EditableListener.NOTIFY_IME_OPEN_VKB_PREVENT_SCROLL
.
Comment 3•5 years ago
|
||
I doubt this is element.focus() specific.
All focus handling needs to go through FocusManager.
Comment 4•5 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #3)
I doubt this is element.focus() specific.
All focus handling needs to go through FocusManager.
I also guess it's not element.focus
specific. In nsFocusManager::Focus, IMEStateManager::OnChangeFocus is already called. I guess all focus handling goes through nsFocusManager
already. Presumably, a new argument preventScroll
will have to be passed to IMEStateManager::OnChangeFocus
and that'll have to handle it properly. Which includes adapting the call-chain in comment #2.
Reporter | ||
Updated•5 years ago
|
Updated•1 year ago
|
Description
•