Removed unused scroll patch after testing
- Tested on android and ios - Also checked on translations and removed todo.
This commit is contained in:
parent
e0d9380055
commit
572d8b3700
3 changed files with 1 additions and 18 deletions
|
@ -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;
|
||||
});
|
||||
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue