File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/LiveDevelopment/BrowserScripts Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -3710,7 +3710,7 @@ function RemoteFunctions(config = {}) {
37103710 function onMouseOver ( event ) {
37113711 if ( _validEvent ( event ) ) {
37123712 const element = event . target ;
3713- if ( isElementEditable ( element ) && element . nodeType === Node . ELEMENT_NODE ) {
3713+ if ( isElementInspectable ( element ) && element . nodeType === Node . ELEMENT_NODE ) {
37143714 _localHighlight . add ( element , true ) ;
37153715 }
37163716 }
@@ -3914,10 +3914,17 @@ function RemoteFunctions(config = {}) {
39143914 function onClick ( event ) {
39153915 const element = event . target ;
39163916
3917- if ( isElementEditable ( element ) ) {
3917+ if ( isElementInspectable ( element ) ) {
39183918 event . preventDefault ( ) ;
39193919 event . stopPropagation ( ) ;
39203920 event . stopImmediatePropagation ( ) ;
3921+
3922+ // when in click mode, only select dynamic elements (without data-brackets-id) directly
3923+ // as for static elements, the editor will handle selection via highlight message
3924+ if ( ! shouldShowHighlightOnHover ( ) && ! element . hasAttribute ( "data-brackets-id" ) ) {
3925+ _selectElement ( element ) ;
3926+ }
3927+
39213928 activateHoverLock ( ) ;
39223929 }
39233930 }
You can’t perform that action at this time.
0 commit comments