mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 06:05:30 -05:00
Use built in Ace browser detection
This commit is contained in:
parent
e26eda5754
commit
0fbbad33ff
1 changed files with 2 additions and 6 deletions
|
@ -35,6 +35,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
var ACE_NAMESPACE = "ace";
|
var ACE_NAMESPACE = "ace";
|
||||||
|
|
||||||
var global = (function() { return this; })();
|
var global = (function() { return this; })();
|
||||||
|
@ -1918,11 +1919,6 @@ var lang = require("../lib/lang");
|
||||||
var BROKEN_SETDATA = useragent.isChrome < 18;
|
var BROKEN_SETDATA = useragent.isChrome < 18;
|
||||||
var USE_IE_MIME_TYPE = useragent.isIE;
|
var USE_IE_MIME_TYPE = useragent.isIE;
|
||||||
|
|
||||||
// WORKAROUND: Accent keys and Korean keys don't work in Chrome >53.
|
|
||||||
// https://github.com/ajaxorg/ace/issues/3045
|
|
||||||
var chromeVersion = navigator.userAgent.match(/Chrome\/(\d*)/)[1];
|
|
||||||
var isChrome53Plus = (chromeVersion >= 53);
|
|
||||||
|
|
||||||
var TextInput = function(parentNode, host) {
|
var TextInput = function(parentNode, host) {
|
||||||
var text = dom.createElement("textarea");
|
var text = dom.createElement("textarea");
|
||||||
text.className = "ace_text-input";
|
text.className = "ace_text-input";
|
||||||
|
@ -2289,7 +2285,7 @@ var TextInput = function(parentNode, host) {
|
||||||
}
|
}
|
||||||
// WORKAROUND: Accent keys and Korean keys don't work in Chrome >53.
|
// WORKAROUND: Accent keys and Korean keys don't work in Chrome >53.
|
||||||
// https://github.com/ajaxorg/ace/issues/3045
|
// https://github.com/ajaxorg/ace/issues/3045
|
||||||
if (isChrome53Plus) onInput();
|
if (useragent.isChrome >= 53) onInput();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue