pukhalski / tap

1Kb library for easy unified handling of user interactions such as mouse, touch and pointer events.
https://github.com/pukhalski/tap/archive/master.zip
MIT License
527 stars 45 forks source link

Expand taps from BODY to HTML #25

Closed yoyurec closed 9 years ago

yoyurec commented 9 years ago

When you use fixed width & margin: 0 auto for body in layout there is an issue: Clicking on empty areas (target - html) doesn't not fire tap event, b'cose they are not in listen scope (body).

55194fff1ae737-17091547

Just replace document.body to document.documentElement! https://github.com/pukhalski/tap/blob/master/dist/tap.js#L73 https://github.com/pukhalski/tap/blob/master/dist/tap.js#L141

yoyurec commented 9 years ago

https://github.com/pukhalski/tap/pull/26

pukhalski commented 9 years ago

Thanks, merged.