[Mobile] For Bug 45844
This commit is contained in:
parent
420d60fe5e
commit
919a05878c
|
@ -69,6 +69,12 @@ define([
|
|||
return out;
|
||||
};
|
||||
|
||||
function iOSVersion() {
|
||||
var ua = navigator.userAgent;
|
||||
var m;
|
||||
return (m = /(iPad|iPhone|iphone).*?(OS |os |OS\_)(\d+((_|\.)\d)?((_|\.)\d)?)/.exec(ua)) ? parseFloat(m[3]) : 0;
|
||||
}
|
||||
|
||||
return {
|
||||
models: [],
|
||||
collections: [],
|
||||
|
@ -99,8 +105,14 @@ define([
|
|||
var me = this;
|
||||
me.createView('Search').render();
|
||||
|
||||
$('#editor_sdk').single('mousedown touchstart', _.bind(me.onEditorTouchStart, me));
|
||||
$('#editor_sdk').single('mouseup touchend', _.bind(me.onEditorTouchEnd, me));
|
||||
if (iOSVersion()<13) {
|
||||
$('#editor_sdk').single('mousedown touchstart', _.bind(me.onEditorTouchStart, me));
|
||||
$('#editor_sdk').single('mouseup touchend', _.bind(me.onEditorTouchEnd, me));
|
||||
} else {
|
||||
$('#editor_sdk').single('pointerdown', _.bind(me.onEditorTouchStart, me));
|
||||
$('#editor_sdk').single('pointerup', _.bind(me.onEditorTouchEnd, me));
|
||||
}
|
||||
|
||||
Common.NotificationCenter.on('readermode:change', function (reader) {
|
||||
_startPoint = {};
|
||||
});
|
||||
|
|
|
@ -69,6 +69,12 @@ define([
|
|||
return out;
|
||||
};
|
||||
|
||||
function iOSVersion() {
|
||||
var ua = navigator.userAgent;
|
||||
var m;
|
||||
return (m = /(iPad|iPhone|iphone).*?(OS |os |OS\_)(\d+((_|\.)\d)?((_|\.)\d)?)/.exec(ua)) ? parseFloat(m[3]) : 0;
|
||||
}
|
||||
|
||||
return {
|
||||
models: [],
|
||||
collections: [],
|
||||
|
@ -99,8 +105,13 @@ define([
|
|||
var me = this;
|
||||
me.createView('Search').render();
|
||||
|
||||
$('#editor_sdk').single('mousedown touchstart', _.bind(me.onEditorTouchStart, me));
|
||||
$('#editor_sdk').single('mouseup touchend', _.bind(me.onEditorTouchEnd, me));
|
||||
if (iOSVersion()<13) {
|
||||
$('#editor_sdk').single('mousedown touchstart', _.bind(me.onEditorTouchStart, me));
|
||||
$('#editor_sdk').single('mouseup touchend', _.bind(me.onEditorTouchEnd, me));
|
||||
} else {
|
||||
$('#editor_sdk').single('pointerdown', _.bind(me.onEditorTouchStart, me));
|
||||
$('#editor_sdk').single('pointerup', _.bind(me.onEditorTouchEnd, me));
|
||||
}
|
||||
},
|
||||
|
||||
showSearch: function () {
|
||||
|
|
|
@ -68,6 +68,12 @@ define([
|
|||
return out;
|
||||
};
|
||||
|
||||
function iOSVersion() {
|
||||
var ua = navigator.userAgent;
|
||||
var m;
|
||||
return (m = /(iPad|iPhone|iphone).*?(OS |os |OS\_)(\d+((_|\.)\d)?((_|\.)\d)?)/.exec(ua)) ? parseFloat(m[3]) : 0;
|
||||
}
|
||||
|
||||
return {
|
||||
models: [],
|
||||
collections: [],
|
||||
|
@ -100,8 +106,13 @@ define([
|
|||
var me = this;
|
||||
me.createView('Search').render();
|
||||
|
||||
$('#editor_sdk').single('mousedown touchstart', _.bind(me.onEditorTouchStart, me));
|
||||
$('#editor_sdk').single('mouseup touchend', _.bind(me.onEditorTouchEnd, me));
|
||||
if (iOSVersion()<13) {
|
||||
$('#editor_sdk').single('mousedown touchstart', _.bind(me.onEditorTouchStart, me));
|
||||
$('#editor_sdk').single('mouseup touchend', _.bind(me.onEditorTouchEnd, me));
|
||||
} else {
|
||||
$('#editor_sdk').single('pointerdown', _.bind(me.onEditorTouchStart, me));
|
||||
$('#editor_sdk').single('pointerup', _.bind(me.onEditorTouchEnd, me));
|
||||
}
|
||||
},
|
||||
|
||||
showSearch: function () {
|
||||
|
|
Loading…
Reference in a new issue