From 572d8b37007d61e5d5760544d5293b12f393c639 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Tue, 8 Feb 2022 09:42:18 +0000 Subject: [PATCH] Removed unused scroll patch after testing - Tested on android and ios - Also checked on translations and removed todo. --- resources/js/wysiwyg/config.js | 3 +-- resources/js/wysiwyg/drop-paste-handling.js | 1 - resources/js/wysiwyg/scrolling.js | 15 --------------- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/resources/js/wysiwyg/config.js b/resources/js/wysiwyg/config.js index 0b43b9c79..2c9fb0553 100644 --- a/resources/js/wysiwyg/config.js +++ b/resources/js/wysiwyg/config.js @@ -1,6 +1,6 @@ import {register as registerShortcuts} from "./shortcuts"; import {listen as listenForCommonEvents} from "./common-events"; -import {scrollToQueryString, fixScrollForMobile} from "./scrolling"; +import {scrollToQueryString} from "./scrolling"; import {listenForDragAndPaste} from "./drop-paste-handling"; import {getPlugin as getCodeeditorPlugin} from "./plugin-codeeditor"; @@ -164,7 +164,6 @@ function getSetupCallback(options) { editor.on('init', () => { editorChange(); scrollToQueryString(editor); - fixScrollForMobile(editor); window.editor = editor; }); diff --git a/resources/js/wysiwyg/drop-paste-handling.js b/resources/js/wysiwyg/drop-paste-handling.js index 1da13c888..ace74dd33 100644 --- a/resources/js/wysiwyg/drop-paste-handling.js +++ b/resources/js/wysiwyg/drop-paste-handling.js @@ -43,7 +43,6 @@ function paste(editor, options, event) { editor.dom.replace(newEl, id); }).catch(err => { editor.dom.remove(id); - // TODO - Check we have this translation window.$events.emit('error', options.translations.imageUploadErrorText); console.log(err); }); diff --git a/resources/js/wysiwyg/scrolling.js b/resources/js/wysiwyg/scrolling.js index 360d18381..f14ef4c64 100644 --- a/resources/js/wysiwyg/scrolling.js +++ b/resources/js/wysiwyg/scrolling.js @@ -11,21 +11,6 @@ export function scrollToQueryString(editor) { } } -/** - * Override for touch events to allow scrolling on mobile devices. - * TODO - Check if still needed or if needs editing. - * @param {Editor} editor - */ -export function fixScrollForMobile(editor) { - const container = editor.getContainer(); - const toolbarButtons = container.querySelectorAll('.mce-btn'); - for (let button of toolbarButtons) { - button.addEventListener('touchstart', event => { - event.stopPropagation(); - }); - } -} - /** * @param {Editor} editor * @param {String} scrollId