Merge pull request #30 from sharelatex/pr-fix-chrome-61-62-shadow

Fix chrome 61 and 62 shadow
This commit is contained in:
Paulo Jorge Reis 2017-10-03 11:18:08 +01:00 committed by GitHub
commit 6996f52195

View file

@ -191,6 +191,20 @@ define [
if ide.browserIsSafari if ide.browserIsSafari
ide.safariScrollPatcher = new SafariScrollPatcher($scope) ide.safariScrollPatcher = new SafariScrollPatcher($scope)
# Fix Chrome 61 and 62 text-shadow rendering
browserIsChrome61or62 = false
try
chromeVersion = parseFloat(navigator.userAgent.split(" Chrome/")[1]) || null;
browserIsChrome61or62 = (
chromeVersion? &&
(chromeVersion == 61 || chromeVersion == 62)
)
if browserIsChrome61or62
document.styleSheets[0].insertRule(".ace_editor.ace_autocomplete .ace_completion-highlight { text-shadow: none !important; }", 1)
catch err
console.error err
# User can append ?ft=somefeature to url to activate a feature toggle # User can append ?ft=somefeature to url to activate a feature toggle
ide.featureToggle = location?.search?.match(/^\?ft=(\w+)$/)?[1] ide.featureToggle = location?.search?.match(/^\?ft=(\w+)$/)?[1]