Closed
Bug 572649
Opened 14 years ago
Closed 14 years ago
Attempting to scroll a textarea with a horizontal scrollbar using the mouse jumps to its bottom right (focusing a textarea with the mouse scrolls the selection into view)
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
VERIFIED
FIXED
mozilla2.0b7
Tracking | Status | |
---|---|---|
blocking2.0 | --- | betaN+ |
People
(Reporter: john.p.baker, Assigned: ehsan.akhgari)
References
Details
(Keywords: regression, testcase)
Attachments
(2 files)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
This has hit me a few times over the last couple of days when viewing text in a textarea.
1) Load attachment
2 [review]) Click on scrollbar to move down (or right)
Textarea becomes positioned at last character.
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.3a6pre) Gecko/20100616 Minefield/3.7a6pre
Reporter | ||
Comment 1•14 years ago
|
||
Similarly context-clicking in the unfocussed textarea.
Reporter | ||
Comment 2•14 years ago
|
||
ehsan, you seem to have done a few changes in this area recently.
Assignee | ||
Comment 3•14 years ago
|
||
This happens because the textarea is focused when you click a scroll button, which causes us to scroll its selection into view, which causes this behavior (see bug 353539 where this behavior was added).
I guess we could detect that we're getting the focus because of a click on the scrollbar, but I'm not sure how to do that.
Blocks: 353539
Summary: Scrolling unfocused textarea leaps to bottom right. → Attempting to scroll a textarea with a horizontal scrollbar using the mouse jumps to its bottom right
I think we can distinguish click-to-focus from other kinds of focus. We shouldn't scroll into view when clicking to focus.
Reporter | ||
Comment 5•14 years ago
|
||
(In reply to comment #4)
> I think we can distinguish click-to-focus from other kinds of focus. We
> shouldn't scroll into view when clicking to focus.
It may not only be click-to-focus
1) Load attachment.
2) Press tab key.
Reporter | ||
Updated•14 years ago
|
blocking2.0: --- → ?
Updated•14 years ago
|
blocking2.0: ? → betaN+
Summary: Attempting to scroll a textarea with a horizontal scrollbar using the mouse jumps to its bottom right → Attempting to scroll a textarea with a horizontal scrollbar using the mouse jumps to its bottom right (focusing a textarea with the mouse scrolls the selection into view)
Comment 7•14 years ago
|
||
You can detect what method was last used to focus with nsIFocusManager::GetLastFocusMethod
But why do you want to special case this considering comment 5? Shouldn't the textarea already be scrolled to the caret to start with?
Assignee | ||
Comment 8•14 years ago
|
||
Hmm, I guess one solution would be to initialize the selection to the beginning of the textarea initially instead of its end, but I'm not sure if we want that. That's what Webkit does BTW.
Comment 9•14 years ago
|
||
In general, though, caret position can be outside of the visible area due to mousewheel scrolling.
Assignee | ||
Comment 10•14 years ago
|
||
(In reply to comment #9)
> In general, though, caret position can be outside of the visible area due to
> mousewheel scrolling.
Hmm, yes. So, in that case, I'm not really sure how to address this problem.
We can make clicking in the scrollbar focus the textarea without scrolling anything into view.
Ehsan, do you want this?
Assignee | ||
Comment 12•14 years ago
|
||
(In reply to comment #11)
> We can make clicking in the scrollbar focus the textarea without scrolling
> anything into view.
What about comment 5?
> Ehsan, do you want this?
Sure.
Assignee: nobody → ehsan
It's not clear to me that scrolling the caret into view when we tab into the control is wrong, whereas it seems to clear to me that this bug as filed (comment #0) is a real bug.
Assignee | ||
Comment 14•14 years ago
|
||
Attachment #476954 -
Flags: review?(roc)
Attachment #476954 -
Flags: review?(roc) → review+
Assignee | ||
Comment 15•14 years ago
|
||
Flags: in-testsuite+
Target Milestone: --- → mozilla2.0b7
Assignee | ||
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 16•14 years ago
|
||
Verified. [That makes my CMS usable again.]
Mozilla/5.0 (Windows NT 5.0; rv:2.0b7pre) Gecko/20100922 Firefox/4.0b7pre
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•