Removed unused scroll patch after testing

- Tested on android and ios
- Also checked on translations and removed todo.
This commit is contained in:
Dan Brown 2022-02-08 09:42:18 +00:00
parent e0d9380055
commit 572d8b3700
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
3 changed files with 1 additions and 18 deletions

View File

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

View File

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

View File

@ -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