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