contentEditable element scroll to top when cursor position changes by click
Categories
(GeckoView :: IME, defect, P1)
Tracking
(firefox85 fixed)
Tracking | Status | |
---|---|---|
firefox85 | --- | fixed |
People
(Reporter: m_kato, Assigned: m_kato)
References
Details
(Whiteboard: [geckoview:m82][geckoview:m83][geckoview:m84])
Attachments
(1 file)
From https://github.com/mozilla-mobile/fenix/issues/14107. I guess that this is nsIDOMWindowUtils::ZoomToFocusedInput
(https://searchfox.org/mozilla-central/rev/19c23d725f27d0989e4a60f36d64004cebb39736/dom/base/nsDOMWindowUtils.cpp#2563) issue or editor doesn't call SetInputContext
.
At least, when we show software keyboard, content should scroll to visible position of caret.
Steps to reproduce
- Add contentEditable=true attribute on a div using dev tools
- Write something long so that element height should be more than device height.
- Change cursor position using click in bottom of the content.
You can use following gist to add html and content using dev tools.
https://gist.github.com/ujjwalmishra09/58c046ad288babfcc7b016e619b53881
Expected behavior
Element should not scroll on top.
Actual behavior
Element scrolls on top when cursor position changes by click
Just want to add that this bug makes using any web apps based on excellent tiptap editor impossible where other browsers work just fine.
TIA
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Assignee | ||
Comment 3•4 years ago
|
||
When show virtual keyboard, we calls ZoomToFocusedInput to scroll to focused
element. But this method only consider single line control. It means that this
doesn't scroll better position when focused element is multiple such as
content editable. Because we use element rectangle foo zoom to rect.
So I would like to change this for <textarea> and contenteditable.
If <textarea> or contenteditable, we should use caret frame to scroll to
better position.
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/e9c758b96f46 Don't use element bounding for ZoomToFocusedInput when focused element isn't single line control. r=botond
Comment 5•3 years ago
|
||
bugherder |
Comment 6•2 years ago
|
||
Moving some cursor and key event bugs to the new GeckoView::IME component.
Description
•