Skip to content

Instantly share code, notes, and snippets.

@marcj
Created July 27, 2013 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcj/6094735 to your computer and use it in GitHub Desktop.
Save marcj/6094735 to your computer and use it in GitHub Desktop.
TinyMCE fix #5881SharePrint. iOs/iPad focus bug.
diff -ur a/js/tinymce/classes/Editor.js b/js/tinymce/classes/Editor.js
--- a/js/tinymce/classes/Editor.js 2013-07-18 14:13:44.000000000 +0200
+++ b/js/tinymce/classes/Editor.js 2013-07-27 14:24:58.000000000 +0200
@@ -1009,6 +1009,12 @@
self.getWin().focus();
}
+ if (document != self.getDoc()) {
+ //WebKit in iOs needs a window focus call if the current document is different than self.getDoc()
+ //in inline mode. Scenario: create a inline editor of a contentEditable div inside a iframe.
+ self.getWin().focus();
+ }
+
// Focus the body as well since it's contentEditable
if (isGecko || contentEditable) {
body = self.getBody();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment