Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upArrow keys in a focused text box scroll the page #8379
Closed
Labels
Comments
bors-servo
added a commit
that referenced
this issue
Nov 8, 2015
Added call to event.PreventDefault on html text inputs and textareas. This change should prevent page scrolling when up/down buttons are pressed within text inputs and textboxes which should resolve issue #8379. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8400) <!-- Reviewable:end -->
|
No test? |
|
What sort of automated test are you thinking of? |
|
Fixed by #8400. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We need to call
preventDefaulton the event that we process inhandle_eventfor bothHTMLTextAreaElementandHTMLInputElement(but only in the cases that we redraw the selection or dispatch input). If the default action for the event isn't prevented, we end up telling the compositor that the key wasn't handled so it can perform its default actions (like scrolling the page).Testcase: https://hire.jobvite.com/CompanyJobs/Careers.aspx?c=qpX9Vfwa&k=Apply&j=ozy21fwU&utm_source=careers.mozilla.org&s=PDN&utm_medium=referral (press up and down in the textbox)
Code:
components/script/dom/htmlinputelement.rs,components/script/dom/htmltextareaelement.rs