Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Forward modifier keys from touch events
Browse files Browse the repository at this point in the history
Fixes gh-304
Closes gh-300
  • Loading branch information
Robert Tuttle authored and scottgonzalez committed Jun 30, 2016
1 parent 133abaf commit b7a47c9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/touch.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ var touchEvents = {
e.isPrimary = this.isPrimaryTouch(inTouch);
e.pointerType = this.POINTER_TYPE;

// forward modifier keys
e.altKey = cte.altKey;
e.ctrlKey = cte.ctrlKey;
e.metaKey = cte.metaKey;
e.shiftKey = cte.shiftKey;

// forward touch preventDefaults
var self = this;
e.preventDefault = function() {
Expand Down

0 comments on commit b7a47c9

Please sign in to comment.