فهرست منبع

Merge pull request #478 from sharelatex/pr-fix-safari-accent-handling

Fix safari accent handling
James Allen 9 سال پیش
والد
کامیت
6e7b2aaacb
1فایلهای تغییر یافته به همراه7 افزوده شده و 3 حذف شده
  1. 7 3
      services/web/public/js/ace-1.2.5/ace.js

+ 7 - 3
services/web/public/js/ace-1.2.5/ace.js

@@ -2283,9 +2283,13 @@ var TextInput = function(parentNode, host) {
         if (e.type == "compositionend" && c.range) {
             host.selection.setRange(c.range);
         }
-        // WORKAROUND: Accent keys and Korean keys don't work in Chrome >53.
-        // https://github.com/ajaxorg/ace/issues/3045
-        if (useragent.isChrome >= 53) onInput();
+        var needsOnInput =
+            (!!useragent.isChrome && useragent.isChrome >= 53) ||
+            (!!useragent.isWebKit && useragent.isWebKit >= 603);
+
+        if (needsOnInput) {
+          onInput();
+        }
     };