Skip to content

Commit

Permalink
Add method stopCallback evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
kawabata_satoshi committed Aug 25, 2017
1 parent 825ce50 commit 4f1ace4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mousetrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,10 @@
return false;
}

return Mousetrap.stopCallbackElements(element);
};

Mousetrap.prototype.stopCallbackElements = function(element) {
// stop for input, select, and textarea
return element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable;
};
Expand Down

0 comments on commit 4f1ace4

Please sign in to comment.