doubletap: prevent fake click emitted by keyboard focus events (ie in file browser)
This commit is contained in:
parent
c99cfc9f09
commit
39327fb7f2
1 changed files with 2 additions and 1 deletions
|
|
@ -16,7 +16,8 @@ module.exports = (element, callback, options={})=>{
|
|||
|
||||
tapLength < DOUBLE_TAP_TIME &&
|
||||
Math.abs(lastTapX - eventData.pageX) < 20 &&
|
||||
Math.abs(lastTapY - eventData.pageY) < 20
|
||||
Math.abs(lastTapY - eventData.pageY) < 20 &&
|
||||
(!options.click || event.pageX !== 0) // prevent fake click emitted with keyboard focus events
|
||||
|
||||
) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue