File tree Expand file tree Collapse file tree
src/LiveDevelopment/BrowserScripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -764,12 +764,8 @@ function RemoteFunctions(config = {}) {
764764 } ) ;
765765 }
766766
767- // we call the select element function only when the element is not editable (JS generated content)
768- // because for editable elements, highlightRule function already calls selectElement internally
769- if ( ! LivePreviewView . isElementEditable ( element ) ) {
770- selectElement ( element ) ;
771- }
772767 brieflyDisableHoverListeners ( ) ;
768+ selectElement ( element ) ;
773769 }
774770
775771 // remove active highlights
@@ -813,6 +809,12 @@ function RemoteFunctions(config = {}) {
813809 let foundValidElement = false ;
814810 for ( i = 0 ; i < nodes . length ; i ++ ) {
815811 if ( LivePreviewView . isElementInspectable ( nodes [ i ] , true ) && nodes [ i ] . tagName !== "BR" ) {
812+ // if hover lock timer is active, we don't call selectElement as,
813+ // it means that its already called by handleElementClick function
814+ if ( _hoverLockTimer && nodes [ i ] === previouslyClickedElement ) {
815+ foundValidElement = true ;
816+ break ;
817+ }
816818 selectElement ( nodes [ i ] ) ;
817819 foundValidElement = true ;
818820 break ;
You can’t perform that action at this time.
0 commit comments