Closed Bug 946632 Opened 6 years ago Closed 6 years ago
input field can scroll and scroll
Top returns 0
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0 (Beta/Release) Build ID: 20131028112446 Steps to reproduce: 1. In the attachments is a testcase for this bug. 2. After opening it select the text in the input field and keep the left mouse button pressed. 3. Move down the mouse as you would to select another line. Actual results: 1. The input field does scroll. 2. After the scrolling the scrollTop attribute returns 0. Expected results: As input fields have no onscroll attribute it is likely that they should never scroll. If the text is too big it should be simply hidden. But if we want to keep the scrolling behavior it should at least update the scrollTop attribute.
Input fields have to scroll, if you think about it: if the text is longer than the input field, it has to scroll to show it.
Component: DOM → Layout: Form Controls
Both IE11 and Chrome33 supports vertical scrolling when doing selection-by-mouse. Neither do mouse-wheel vertical scrolling though. IE11 dispatches scroll events, Chrome does not, for both vert./hor. scrolls in both cases. Chrome reports a non-zero scrollTop when scrolled, IE11 always reports zero. (Nightly actually has a non-zero scrollTop after a vertical scroll, so that part of "actual results" not true in Nightly.) Since all three UAs supports vertical scrolling for selection-by-mouse I think we should leave that as is. I also think we should report the true (non-zero) scrollTop in that case. I also think we should continue to support scroll events, for both vertical and horizontal scrolls, and have the HTML spec amended to support that. What we should change is: remove support for mouse-wheel vertical scroll (it should scroll the nearest enclosing scroll view instead), for compatibility with IE/Chrome. Boris, what do you think?
Severity: normal → minor
Priority: -- → P4
Boris, do you agree with comment 2?
Comment 2 sounds perfectly reasonable to me.
Assignee: nobody → matspal
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #8351043 - Flags: review?(bzbarsky)
Comment on attachment 8351043 [details] [diff] [review] Don't scroll vertically by mouse-wheel on a single-line text control. r=me
Attachment #8351043 - Flags: review?(bzbarsky) → review+
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
4 years ago
You need to log in before you can comment on or make changes to this bug.