File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ export class HXDisclosureElement extends HXElement {
7878 get target ( ) {
7979 if ( ! this . _target ) {
8080 let targetId = this . getAttribute ( 'aria-controls' ) ;
81- this . _target = document . getElementById ( targetId ) ;
81+ this . _target = this . getRootNode ( ) . getElementById ( targetId ) ;
8282 }
8383 return this . _target ;
8484 }
Original file line number Diff line number Diff line change @@ -58,9 +58,9 @@ export class HXMenuElement extends HXElement {
5858
5959 get relativeElement ( ) {
6060 if ( this . relativeTo ) {
61- return document . getElementById ( this . relativeTo ) ;
61+ return this . getRootNode ( ) . getElementById ( this . relativeTo ) ;
6262 } else {
63- return document . querySelector ( `[aria-controls="${ this . id } "]` ) ;
63+ return this . getRootNode ( ) . querySelector ( `[aria-controls="${ this . id } "]` ) ;
6464 }
6565 }
6666
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ export class HXPopoverElement extends HXElement {
4141 return ;
4242 }
4343
44- this . _target = document . querySelector ( '[data-popover=' + this . id + ']' ) ;
44+ this . _target = this . getRootNode ( ) . querySelector ( '[data-popover=' + this . id + ']' ) ;
4545 if ( ! this . _target ) {
4646 return ;
4747 }
Original file line number Diff line number Diff line change @@ -33,11 +33,11 @@ export class HXTooltipElement extends HXElement {
3333 connectedCallback ( ) {
3434 this . $defaultAttribute ( 'position' , 'top' ) ;
3535 this . initialPosition = this . position ;
36- this . $upgradeProperty ( 'open' ) ;
36+ this . $upgradeProperty ( 'open' ) ;
3737 this . $defaultAttribute ( 'role' , 'tooltip' ) ;
3838
3939 if ( this . id ) {
40- this . _target = document . querySelector ( '[data-tooltip=' + this . id + ']' ) ;
40+ this . _target = this . getRootNode ( ) . querySelector ( '[data-tooltip=' + this . id + ']' ) ;
4141 } else {
4242 return ;
4343 }
You can’t perform that action at this time.
0 commit comments