Skip to content

Arrow keys in a focused text box scroll the page #8379

Closed

Description

@jdm

We need to call preventDefault on the event that we process in handle_event for both HTMLTextAreaElement and HTMLInputElement (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

Activity

  1. added
    A-content/dom
    E-less-complex
    on Nov 6, 2015
  2. added a commit that references this issue on Nov 8, 2015
  3. Ms2ger commented on Nov 8, 2015

    @Ms2ger
    Contributor

    No test?

  4. jdm commented on Nov 8, 2015

    @jdm
    MemberAuthor

    What sort of automated test are you thinking of?

  5. jdm commented on Nov 18, 2015

    @jdm
    MemberAuthor

    Fixed by #8400.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/domE-less-complex

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions