We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f92e15c commit 5367599Copy full SHA for 5367599
1 file changed
src/LiveDevelopment/BrowserScripts/RemoteFunctions.js
@@ -755,6 +755,17 @@ function RemoteFunctions(config = {}) {
755
*/
756
function highlightRule(rule) {
757
hideHighlight();
758
+
759
+ // Filter out the universal selector (*) from the rule - highlighting everything
760
+ // is not useful, similar to how we skip html/body in isElementInspectable.
761
+ // The rule can be a comma-separated list of selectors (from multi-cursor),
762
+ // so we filter out any standalone * segments and keep valid ones.
763
+ rule = rule.split(",").map(s => s.trim()).filter(s => s !== "*").join(",");
764
+ if (!rule) {
765
+ dismissUIAndCleanupState();
766
+ return;
767
+ }
768
769
const nodes = window.document.querySelectorAll(rule);
770
771
// Highlight all matching nodes
0 commit comments