11import { gecko , ie , ie_version , mobile , webkit } from "../util/browser"
2- import { elt } from "../util/dom"
2+ import { elt , eltP } from "../util/dom"
33import { scrollerGap } from "../util/misc"
44
55// The display handles the DOM integration, both for input reading
@@ -18,7 +18,7 @@ export function Display(place, doc, input) {
1818 d . gutterFiller = elt ( "div" , null , "CodeMirror-gutter-filler" )
1919 d . gutterFiller . setAttribute ( "cm-not-content" , "true" )
2020 // Will contain the actual code, positioned to cover the viewport.
21- d . lineDiv = elt ( "div" , null , "CodeMirror-code" )
21+ d . lineDiv = eltP ( "div" , null , "CodeMirror-code" )
2222 // Elements are added to these to represent selection and cursors.
2323 d . selectionDiv = elt ( "div" , null , null , "position: relative; z-index: 1" )
2424 d . cursorDiv = elt ( "div" , null , "CodeMirror-cursors" )
@@ -27,10 +27,11 @@ export function Display(place, doc, input) {
2727 // When lines outside of the viewport are measured, they are drawn in this.
2828 d . lineMeasure = elt ( "div" , null , "CodeMirror-measure" )
2929 // Wraps everything that needs to exist inside the vertically-padded coordinate system
30- d . lineSpace = elt ( "div" , [ d . measure , d . lineMeasure , d . selectionDiv , d . cursorDiv , d . lineDiv ] ,
30+ d . lineSpace = eltP ( "div" , [ d . measure , d . lineMeasure , d . selectionDiv , d . cursorDiv , d . lineDiv ] ,
3131 null , "position: relative; outline: none" )
32+ let lines = eltP ( "div" , [ d . lineSpace ] , "CodeMirror-lines" )
3233 // Moved around its parent to cover visible view.
33- d . mover = elt ( "div" , [ elt ( "div" , [ d . lineSpace ] , "CodeMirror- lines" ) ] , null , "position: relative" )
34+ d . mover = elt ( "div" , [ lines ] , null , "position: relative" )
3435 // Set to the height of the document, allowing scrolling.
3536 d . sizer = elt ( "div" , [ d . mover ] , "CodeMirror-sizer" )
3637 d . sizerWidth = null
0 commit comments