Skip to content

Commit ef6b544

Browse files
committed
fix: background color from some elements doesn't get removed when config is changed
1 parent d185e79 commit ef6b544

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2520,6 +2520,14 @@ function RemoteFunctions(config) {
25202520
clearElementBackground(previouslyClickedElement);
25212521
}
25222522

2523+
// Clear all elements that might have hover background styling applied
2524+
const allElements = window.document.querySelectorAll("[data-brackets-id]");
2525+
for (let i = 0; i < allElements.length; i++) {
2526+
if (allElements[i]._originalBackgroundColor !== undefined) {
2527+
clearElementBackground(allElements[i]);
2528+
}
2529+
}
2530+
25232531
// Remove info box when switching modes to avoid confusion
25242532
if (_nodeInfoBox && !_nodeMoreOptionsBox) {
25252533
_nodeInfoBox.remove();

0 commit comments

Comments
 (0)