Closed Bug 483558 Opened 15 years ago Closed 15 years ago

text in html:input elements scrolls out of view on editting or moving the caret

Categories

(Core :: DOM: Editor, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
mozilla1.9.1

People

(Reporter: karlt, Assigned: karlt)

References

Details

Attachments

(2 files)

Attached file testcase
STR:
1. Load the attached testcase.
2. Scroll the text input (with the mouse wheel) until its text content (",.,.,.") is visible.  (When bug 425004 is fixed, this step probably won't be necessary.)
3. Click in the text input.
4. Press left or right to move the caret (or enter another "." or ",").

Expected results:
See the caret move, but minimal other changes.

Actual results:
The content text in the input is scrolled out of view.
NS_PRESSHELL_SCROLL_ANYWHERE == -1.
nsISelection2.idl says re aVPercent for scrollIntoView "A value of -1 means
move the frame the minimum amount necessary in order for the entire frame to
be visible vertically (if possible)."  That doesn't define what should happen if it is not possible to make the entire frame height visible, but it seems to a logical extension to accept any scroll position at which the visible height is completely occupied by the frame, which is equivalent to any position that could be produced with an aVPercent in the range 0-100.

(Maybe we could also change the selection rect so that its vertical bounds come from the em ascent and descent of the font used for the character at offset instead of from the frame height.  But that probably wouldn't be optimal when the whole frame height could be made visible, and there would probably still be situations where the selection rect can't be made completely visible.)
Attachment #367950 - Flags: review?(roc)
Flags: blocking1.9.0.9?
Flags: blocking1.9.0.10?
No longer blocks: 453827
With the fix for bug 481751, the testcase behavior is much better, so we don't really need this patch.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Depends on: 488776
No longer depends on: 425004
Resolution: --- → WORKSFORME
Depends on: 481751
No longer depends on: 488776
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: