Skip to content

Commit

Permalink
MDL-41328 Editor: Work around another iOS issue with TinyMCE
Browse files Browse the repository at this point in the history
We apply this only on touchend and not touchstart or touchmove. The
location is not guaranteed until the end of the gesture, and there's no
need to keep applying focus on every move.
  • Loading branch information
andrewnicols authored and Damyon Wiese committed Sep 2, 2013
1 parent ee78814 commit ff73a6d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/editor/tinymce/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ M.editor_tinymce.init_editor = function(Y, editorid, options) {
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();
});
});
};
}
Expand Down

0 comments on commit ff73a6d

Please sign in to comment.