From ebd0c0bbee267a1a22f958af94d47aab4ef55d2d Mon Sep 17 00:00:00 2001 From: Alexander Yuzhin Date: Fri, 16 Sep 2016 11:04:48 +0300 Subject: [PATCH] Fixed mobile version on ios. --- .../mobile/app/controller/toolbar/Edit.js | 18 ++++++++++++++++++ .../mobile/app/controller/toolbar/View.js | 18 ++++++++++++++++++ .../mobile/app/controller/toolbar/View.js | 18 ++++++++++++++++++ .../mobile/app/controller/toolbar/View.js | 18 ++++++++++++++++++ 4 files changed, 72 insertions(+) diff --git a/apps/documenteditor/mobile/app/controller/toolbar/Edit.js b/apps/documenteditor/mobile/app/controller/toolbar/Edit.js index f098e9b582..9f8da63d9b 100644 --- a/apps/documenteditor/mobile/app/controller/toolbar/Edit.js +++ b/apps/documenteditor/mobile/app/controller/toolbar/Edit.js @@ -130,6 +130,24 @@ Ext.define('DE.controller.toolbar.Edit', { } }, this); + if (Ext.os.is.iOS) { + Ext.each(Ext.ComponentQuery.query('button'), function(button) { + button.element.dom.ontouchstart = Ext.emptyFn(); + button.element.dom.ontouchmove = Ext.emptyFn(); + button.element.dom.ontouchend = Ext.emptyFn(); + }, this); + + Ext.each(Ext.ComponentQuery.query('toolbar'), function(toolbar) { + var preventFn = function(e){ + e.preventDefault(); + }; + + toolbar.element.dom.ontouchstart = preventFn; + toolbar.element.dom.ontouchmove = preventFn; + toolbar.element.dom.ontouchend = preventFn; + }, this); + } + Common.Gateway.on('init', Ext.bind(this.loadConfig, this)); }, diff --git a/apps/documenteditor/mobile/app/controller/toolbar/View.js b/apps/documenteditor/mobile/app/controller/toolbar/View.js index ea48a9a53a..2920aed771 100644 --- a/apps/documenteditor/mobile/app/controller/toolbar/View.js +++ b/apps/documenteditor/mobile/app/controller/toolbar/View.js @@ -87,6 +87,24 @@ Ext.define('DE.controller.toolbar.View', { launch: function() { this.callParent(arguments); + if (Ext.os.is.iOS) { + Ext.each(Ext.ComponentQuery.query('button'), function(button) { + button.element.dom.ontouchstart = Ext.emptyFn(); + button.element.dom.ontouchmove = Ext.emptyFn(); + button.element.dom.ontouchend = Ext.emptyFn(); + }, this); + + Ext.each(Ext.ComponentQuery.query('toolbar'), function(toolbar) { + var preventFn = function(e){ + e.preventDefault(); + }; + + toolbar.element.dom.ontouchstart = preventFn; + toolbar.element.dom.ontouchmove = preventFn; + toolbar.element.dom.ontouchend = preventFn; + }, this); + } + Common.Gateway.on('init', Ext.bind(this.loadConfig, this)); Common.Gateway.on('opendocument', Ext.bind(this.loadDocument, this)); Common.Gateway.on('applyeditrights',Ext.bind(this.onApplyEditRights, this)); diff --git a/apps/presentationeditor/mobile/app/controller/toolbar/View.js b/apps/presentationeditor/mobile/app/controller/toolbar/View.js index 58888ad4d1..8757e17c80 100644 --- a/apps/presentationeditor/mobile/app/controller/toolbar/View.js +++ b/apps/presentationeditor/mobile/app/controller/toolbar/View.js @@ -79,6 +79,24 @@ Ext.define('PE.controller.toolbar.View', { overlayContainer.element.on('touchend', this.onTouchEndDocument, this); } + if (Ext.os.is.iOS) { + Ext.each(Ext.ComponentQuery.query('button'), function(button) { + button.element.dom.ontouchstart = Ext.emptyFn(); + button.element.dom.ontouchmove = Ext.emptyFn(); + button.element.dom.ontouchend = Ext.emptyFn(); + }, this); + + Ext.each(Ext.ComponentQuery.query('toolbar'), function(toolbar) { + var preventFn = function(e){ + e.preventDefault(); + }; + + toolbar.element.dom.ontouchstart = preventFn; + toolbar.element.dom.ontouchmove = preventFn; + toolbar.element.dom.ontouchend = preventFn; + }, this); + } + Common.Gateway.on('init', Ext.bind(this.loadConfig, this)); }, diff --git a/apps/spreadsheeteditor/mobile/app/controller/toolbar/View.js b/apps/spreadsheeteditor/mobile/app/controller/toolbar/View.js index a1b7ed2a90..f39dd4939a 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/toolbar/View.js +++ b/apps/spreadsheeteditor/mobile/app/controller/toolbar/View.js @@ -73,6 +73,24 @@ launch: function() { this.callParent(arguments); + if (Ext.os.is.iOS) { + Ext.each(Ext.ComponentQuery.query('button'), function(button) { + button.element.dom.ontouchstart = Ext.emptyFn(); + button.element.dom.ontouchmove = Ext.emptyFn(); + button.element.dom.ontouchend = Ext.emptyFn(); + }, this); + + Ext.each(Ext.ComponentQuery.query('toolbar'), function(toolbar) { + var preventFn = function(e){ + e.preventDefault(); + }; + + toolbar.element.dom.ontouchstart = preventFn; + toolbar.element.dom.ontouchmove = preventFn; + toolbar.element.dom.ontouchend = preventFn; + }, this); + } + Common.Gateway.on('init', Ext.bind(this.loadConfig, this)); },