@@ -2051,11 +2051,13 @@ class AnnotationEditor {
20512051 // on the top-left one.
20522052 if ( nextFirstPosition < firstPosition ) {
20532053 for ( let i = 0 ; i < firstPosition - nextFirstPosition ; i ++ ) {
2054- this . #resizersDiv. append ( this . #resizersDiv. firstChild ) ;
2054+ this . #resizersDiv. append ( this . #resizersDiv. firstElementChild ) ;
20552055 }
20562056 } else if ( nextFirstPosition > firstPosition ) {
20572057 for ( let i = 0 ; i < nextFirstPosition - firstPosition ; i ++ ) {
2058- this . #resizersDiv. firstChild . before ( this . #resizersDiv. lastChild ) ;
2058+ this . #resizersDiv. firstElementChild . before (
2059+ this . #resizersDiv. lastElementChild
2060+ ) ;
20592061 }
20602062 }
20612063
@@ -2069,7 +2071,7 @@ class AnnotationEditor {
20692071
20702072 this . #setResizerTabIndex( 0 ) ;
20712073 this . #isResizerEnabledForKeyboard = true ;
2072- this . #resizersDiv. firstChild . focus ( { focusVisible : true } ) ;
2074+ this . #resizersDiv. firstElementChild . focus ( { focusVisible : true } ) ;
20732075 event . preventDefault ( ) ;
20742076 event . stopImmediatePropagation ( ) ;
20752077 }
@@ -2397,12 +2399,12 @@ class AnnotationEditor {
23972399 }
23982400
23992401 resetAnnotationElement ( annotation ) {
2400- const { firstChild } = annotation . container ;
2402+ const { firstElementChild } = annotation . container ;
24012403 if (
2402- firstChild ?. nodeName === "DIV" &&
2403- firstChild . classList . contains ( "annotationContent" )
2404+ firstElementChild ?. nodeName === "DIV" &&
2405+ firstElementChild . classList . contains ( "annotationContent" )
24042406 ) {
2405- firstChild . remove ( ) ;
2407+ firstElementChild . remove ( ) ;
24062408 }
24072409 }
24082410}
0 commit comments