Skip to content

Commit 86246b5

Browse files
authored
Merge pull request #553 from swisnl/npusr-master
Touch start added for iPad and iPhone
2 parents 3617c95 + 911bf33 commit 86246b5

File tree

6 files changed

+16
-3
lines changed

6 files changed

+16
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
## Changelog ##
22

3+
### Unreleased
4+
5+
#### Added
6+
7+
* Ability to define touchstart as trigger (thanks @npuser)
8+
39
### 2.5.0
410

511
#### Added

dist/jquery.contextMenu.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Licensed under
1212
* MIT License http://www.opensource.org/licenses/mit-license
1313
*
14-
* Date: 2017-05-25T11:30:28.900Z
14+
* Date: 2017-07-16T11:17:51.231Z
1515
*/
1616

1717
// jscs:disable
@@ -1688,6 +1688,9 @@
16881688

16891689
case 'left':
16901690
$context.on('click' + o.ns, o.selector, o, handle.click);
1691+
break;
1692+
case 'touchstart':
1693+
$context.on('touchstart' + o.ns, o.selector, o, handle.click);
16911694
break;
16921695
/*
16931696
default:

dist/jquery.contextMenu.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jquery.contextMenu.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

documentation/docs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ Value | Description
111111
`right` | Right mouse button
112112
`left` | Left mouse button
113113
`hover` | Hover the element
114+
`touchstart` | Touchstart only
114115
`none` | No trigger
115116

116117
#### Example

src/jquery.contextMenu.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,6 +1688,9 @@
16881688

16891689
case 'left':
16901690
$context.on('click' + o.ns, o.selector, o, handle.click);
1691+
break;
1692+
case 'touchstart':
1693+
$context.on('touchstart' + o.ns, o.selector, o, handle.click);
16911694
break;
16921695
/*
16931696
default:

0 commit comments

Comments
 (0)