Closed Bug 946632 Opened 11 years ago Closed 10 years ago

input field can scroll and scrollTop returns 0

Categories

(Core :: Layout: Form Controls, defect, P4)

25 Branch
x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: sworddragon2, Assigned: MatsPalmgren_bugz)

References

Details

(Keywords: testcase)

Attachments

(3 files)

Attached file test.xhtml
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.
Component: Untriaged → DOM
Keywords: testcase
Product: Firefox → Core
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
Attached file Testcase #2
Boris, do you agree with comment 2?
Flags: needinfo?(bzbarsky)
Comment 2 sounds perfectly reasonable to me.
Flags: needinfo?(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+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/2d6cee5b1223
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: