From 35f6db92326311bb78c9795843aa75dc9e9c7ca4 Mon Sep 17 00:00:00 2001 From: Marcus Fabriczy Date: Thu, 27 Sep 2018 21:33:30 +0930 Subject: [PATCH] MDL-62738: editor_tinymce: Fix call stack size bug on Safari The call stack size was being exceeded via a recursive loop brought by MDL-61189. To fix, this item removes MDL-36803 and MDL-41328 as the iOS keyboard works nicely now on Safari with TinyMCE. --- lib/editor/tinymce/module.js | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/lib/editor/tinymce/module.js b/lib/editor/tinymce/module.js index 0bcfd47f04f..61c56d8ab6a 100644 --- a/lib/editor/tinymce/module.js +++ b/lib/editor/tinymce/module.js @@ -59,28 +59,6 @@ M.editor_tinymce.init_editor = function(Y, editorid, options) { } } - // We have to override the editor setup to work around a bug in iOS browsers - MDL-36803. - if (Y.UA.ios) { - // Retain any setup which is already defined. - options.originalSetupFunction = options.setup || function(){}; - options.setup = function(editor) { - options.originalSetupFunction(); - editor.onPostRender.add(function(ed) { - // Whenever there is a keydown event, ensure that the contentWindow still have focus. - ed.contentDocument.addEventListener('keydown', function() { - ed.contentWindow.focus(); - }); - - // Whenever a touch event is registered against the content document, - // reapply focus. This works around an issue with the location caret not - // being focusable without use of the Loupe. - ed.contentDocument.addEventListener('touchend', function() { - ed.contentWindow.focus(); - }); - }); - }; - } - // Retain any setup which is already defined. options.originalSetupFunction = options.setup || function(){}; options.setup = function(editor) {