[Mobile] For Bug 45844

This commit is contained in:
Julia Radzhabova 2020-07-16 13:43:30 +03:00
parent 420d60fe5e
commit 919a05878c
3 changed files with 40 additions and 6 deletions

View file

@ -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();
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 = {};
});

View file

@ -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();
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 () {

View file

@ -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();
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 () {