Skip to content

Commit 0f41e51

Browse files
committed
Add clip-path to wrapper element on Chrome 105 to work around browser bug
Issue #6982
1 parent 264ba93 commit 0f41e51

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/display/Display.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { gecko, ie, ie_version, mobile, webkit } from "../util/browser.js"
1+
import { gecko, ie, ie_version, mobile, webkit, chrome, chrome_version } from "../util/browser.js"
22
import { elt, eltP } from "../util/dom.js"
33
import { scrollerGap } from "../util/misc.js"
44
import { getGutters, renderGutters } from "./gutters.js"
@@ -48,6 +48,8 @@ export function Display(place, doc, input, options) {
4848
d.scroller.setAttribute("tabIndex", "-1")
4949
// The element in which the editor lives.
5050
d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror")
51+
// See #6982. FIXME remove when this has been fixed for a while in Chrome
52+
if (chrome && chrome_version >= 105) d.wrapper.style.clipPath = "inset(0px)"
5153

5254
// This attribute is respected by automatic translation systems such as Google Translate,
5355
// and may also be respected by tools used by human translators.

0 commit comments

Comments
 (0)