File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
src/LiveDevelopment/BrowserScripts Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -656,6 +656,14 @@ function RemoteFunctions(config) {
656656 return ;
657657 }
658658
659+ // this check because when there is no element on the visible viewport, we don't want to show the box
660+ // for ex: when user clicks on a 'x' button and the button is responsible to hide a panel
661+ // then clicking on that button shouldn't show the more options box
662+ const elemBounds = this . element . getBoundingClientRect ( ) ;
663+ if ( elemBounds . height === 0 && elemBounds . width === 0 ) {
664+ return ;
665+ }
666+
659667 this . _style ( ) ; // style the box
660668
661669 window . document . body . appendChild ( this . body ) ;
@@ -860,6 +868,14 @@ function RemoteFunctions(config) {
860868 return ;
861869 }
862870
871+ // this check because when there is no element on the visible viewport, we don't want to show the box
872+ // for ex: when user clicks on a 'x' button and the button is responsible to hide a panel
873+ // then clicking on that button shouldn't show the more options box
874+ const elemBounds = this . element . getBoundingClientRect ( ) ;
875+ if ( elemBounds . height === 0 && elemBounds . width === 0 ) {
876+ return ;
877+ }
878+
863879 this . _style ( ) ; // style the box
864880
865881 window . document . body . appendChild ( this . body ) ;
You can’t perform that action at this time.
0 commit comments