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

fix(controls): stop event propagation from controls #1210

Merged
merged 3 commits into from
May 19, 2020

Conversation

mickr
Copy link
Contributor

@mickr mickr commented May 14, 2020

  • Stop event propagation from preview controls, this is interfering with annotations.
  • Add new tests for Controls.js constructor

* Stop event propagation from preview controls, this is interfering with annotations.
* Add new tests for Controls.js constructor
@mickr mickr requested a review from a team as a code owner May 14, 2020 18:59
src/lib/Controls.js Outdated Show resolved Hide resolved
@@ -44,10 +44,10 @@ class Controls {
this.controlsEl.addEventListener('mouseleave', this.mouseleaveHandler);
this.controlsEl.addEventListener('focusin', this.focusinHandler);
this.controlsEl.addEventListener('focusout', this.focusoutHandler);
this.controlsEl.addEventListener('click', this.clickHandler);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we move the associated removeEventListener call out of its conditional check as well?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, this component is used in all of the viewers across Preview, so this is a wide-ranging change. Does it have any side effects? Have we tested all the various viewers?

* remove listener from has touch clause
@mergify mergify bot merged commit bd51261 into box:master May 19, 2020
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.

2 participants