[Mobile] For Bug 45844
This commit is contained in:
parent
420d60fe5e
commit
919a05878c
|
@ -69,6 +69,12 @@ define([
|
||||||
return out;
|
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 {
|
return {
|
||||||
models: [],
|
models: [],
|
||||||
collections: [],
|
collections: [],
|
||||||
|
@ -99,8 +105,14 @@ define([
|
||||||
var me = this;
|
var me = this;
|
||||||
me.createView('Search').render();
|
me.createView('Search').render();
|
||||||
|
|
||||||
|
if (iOSVersion()<13) {
|
||||||
$('#editor_sdk').single('mousedown touchstart', _.bind(me.onEditorTouchStart, me));
|
$('#editor_sdk').single('mousedown touchstart', _.bind(me.onEditorTouchStart, me));
|
||||||
$('#editor_sdk').single('mouseup touchend', _.bind(me.onEditorTouchEnd, 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) {
|
Common.NotificationCenter.on('readermode:change', function (reader) {
|
||||||
_startPoint = {};
|
_startPoint = {};
|
||||||
});
|
});
|
||||||
|
|
|
@ -69,6 +69,12 @@ define([
|
||||||
return out;
|
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 {
|
return {
|
||||||
models: [],
|
models: [],
|
||||||
collections: [],
|
collections: [],
|
||||||
|
@ -99,8 +105,13 @@ define([
|
||||||
var me = this;
|
var me = this;
|
||||||
me.createView('Search').render();
|
me.createView('Search').render();
|
||||||
|
|
||||||
|
if (iOSVersion()<13) {
|
||||||
$('#editor_sdk').single('mousedown touchstart', _.bind(me.onEditorTouchStart, me));
|
$('#editor_sdk').single('mousedown touchstart', _.bind(me.onEditorTouchStart, me));
|
||||||
$('#editor_sdk').single('mouseup touchend', _.bind(me.onEditorTouchEnd, 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 () {
|
showSearch: function () {
|
||||||
|
|
|
@ -68,6 +68,12 @@ define([
|
||||||
return out;
|
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 {
|
return {
|
||||||
models: [],
|
models: [],
|
||||||
collections: [],
|
collections: [],
|
||||||
|
@ -100,8 +106,13 @@ define([
|
||||||
var me = this;
|
var me = this;
|
||||||
me.createView('Search').render();
|
me.createView('Search').render();
|
||||||
|
|
||||||
|
if (iOSVersion()<13) {
|
||||||
$('#editor_sdk').single('mousedown touchstart', _.bind(me.onEditorTouchStart, me));
|
$('#editor_sdk').single('mousedown touchstart', _.bind(me.onEditorTouchStart, me));
|
||||||
$('#editor_sdk').single('mouseup touchend', _.bind(me.onEditorTouchEnd, 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 () {
|
showSearch: function () {
|
||||||
|
|
Loading…
Reference in a new issue