Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape key should always close the tip dialog #4736

Merged
merged 1 commit into from
Feb 28, 2020

Conversation

zenparsing
Copy link
Collaborator

@zenparsing zenparsing commented Feb 25, 2020

Resolves brave/brave-browser#7609

After the user presses the "Send Tip" button in the tip dialog, keyboard focus goes to document.body which does not have a keyup handler for the escape key.

This change adds the keyup handler to document.body at page initialization and removes the keyup handler from the site banner component.

Submitter Checklist:

Test Plan:

  • Launch Brave with a clean profile and --rewards=staging=true
  • Open the BR panel, join rewards and claim the grant
  • Navigate to https://duckduckgo.com/
  • Open BR panel and click "Send a tip"
  • Press the ESC key.
    • Verify that the tip dialog closes
  • Open BR panel and click "Send a tip"
  • Select 1 BAT and click "Send Tip"
  • Press the ESC key.
    • Verify that the tip dialog closes

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@zenparsing zenparsing self-assigned this Feb 26, 2020
@zenparsing zenparsing marked this pull request as ready for review February 26, 2020 14:45
Copy link
Contributor

@NejcZdovc NejcZdovc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add test plan

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

Successfully merging this pull request may close these issues.

ESC does not close tip banner after tipping
2 participants