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
|
@ -1,6 +1,6 @@
|
||||||
import {register as registerShortcuts} from "./shortcuts";
|
import {register as registerShortcuts} from "./shortcuts";
|
||||||
import {listen as listenForCommonEvents} from "./common-events";
|
import {listen as listenForCommonEvents} from "./common-events";
|
||||||
import {scrollToQueryString, fixScrollForMobile} from "./scrolling";
|
import {scrollToQueryString} from "./scrolling";
|
||||||
import {listenForDragAndPaste} from "./drop-paste-handling";
|
import {listenForDragAndPaste} from "./drop-paste-handling";
|
||||||
|
|
||||||
import {getPlugin as getCodeeditorPlugin} from "./plugin-codeeditor";
|
import {getPlugin as getCodeeditorPlugin} from "./plugin-codeeditor";
|
||||||
|
@ -164,7 +164,6 @@ function getSetupCallback(options) {
|
||||||
editor.on('init', () => {
|
editor.on('init', () => {
|
||||||
editorChange();
|
editorChange();
|
||||||
scrollToQueryString(editor);
|
scrollToQueryString(editor);
|
||||||
fixScrollForMobile(editor);
|
|
||||||
window.editor = editor;
|
window.editor = editor;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,6 @@ function paste(editor, options, event) {
|
||||||
editor.dom.replace(newEl, id);
|
editor.dom.replace(newEl, id);
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
editor.dom.remove(id);
|
editor.dom.remove(id);
|
||||||
// TODO - Check we have this translation
|
|
||||||
window.$events.emit('error', options.translations.imageUploadErrorText);
|
window.$events.emit('error', options.translations.imageUploadErrorText);
|
||||||
console.log(err);
|
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 {Editor} editor
|
||||||
* @param {String} scrollId
|
* @param {String} scrollId
|
||||||
|
|
Loading…
Reference in New Issue