marchaos/toggle-switch

Mouse_up outside of switch causes firing methods on every click anywhere in the page

Closed this issue · 1 comments

Reproduce the issue:

  1. Click on the switch
  2. Drag a bit
  3. Move mouse outside of the switch
  4. Release mouse
  5. Click anywhere on the page. Functions would be fired that are added to the switch via .addListener method.

Expected behaviour:
Functions should not be fired if mouse is clicked outside the switch.