Skip to content

NOW MANAGED ON CODEBERG

Removed unused scroll patch after testing

Dan Brown572d8b37007d
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