mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 15:07:13 +08:00
only allow Tap gesture to be added for window
This commit is contained in:
12
dist/ionic.js
vendored
12
dist/ionic.js
vendored
@ -293,9 +293,15 @@ if ( document.readyState === "complete" ) {
|
|||||||
ionic.Gestures.event.determineEventTypes();
|
ionic.Gestures.event.determineEventTypes();
|
||||||
|
|
||||||
// Register all gestures inside ionic.Gestures.gestures
|
// Register all gestures inside ionic.Gestures.gestures
|
||||||
for(var name in ionic.Gestures.gestures) {
|
if(this === this.window) {
|
||||||
if(ionic.Gestures.gestures.hasOwnProperty(name)) {
|
// this is a window, then only allow the Tap gesture to be added
|
||||||
ionic.Gestures.detection.register(ionic.Gestures.gestures[name]);
|
ionic.Gestures.detection.register(ionic.Gestures.gestures.Tap);
|
||||||
|
} else {
|
||||||
|
// everything else but the window
|
||||||
|
for(var name in ionic.Gestures.gestures) {
|
||||||
|
if(ionic.Gestures.gestures.hasOwnProperty(name)) {
|
||||||
|
ionic.Gestures.detection.register(ionic.Gestures.gestures[name]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -90,9 +90,15 @@
|
|||||||
ionic.Gestures.event.determineEventTypes();
|
ionic.Gestures.event.determineEventTypes();
|
||||||
|
|
||||||
// Register all gestures inside ionic.Gestures.gestures
|
// Register all gestures inside ionic.Gestures.gestures
|
||||||
for(var name in ionic.Gestures.gestures) {
|
if(this === this.window) {
|
||||||
if(ionic.Gestures.gestures.hasOwnProperty(name)) {
|
// this is a window, then only allow the Tap gesture to be added
|
||||||
ionic.Gestures.detection.register(ionic.Gestures.gestures[name]);
|
ionic.Gestures.detection.register(ionic.Gestures.gestures.Tap);
|
||||||
|
} else {
|
||||||
|
// everything else but the window
|
||||||
|
for(var name in ionic.Gestures.gestures) {
|
||||||
|
if(ionic.Gestures.gestures.hasOwnProperty(name)) {
|
||||||
|
ionic.Gestures.detection.register(ionic.Gestures.gestures[name]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user