refactor: remove backup highlight cleanup from clearAllHighlights

This commit is contained in:
neerajadhav 2025-07-08 18:16:12 +05:30
parent 30677df3d3
commit d6219339ef

View File

@ -68,20 +68,6 @@ export function clearAllHighlights() {
element.style.transition = originalTransition
})
activeHighlights.clear()
// Also clear any highlights that might not be tracked (backup cleanup)
// This catches highlights in popovers or other edge cases
const allHighlightedElements = document.querySelectorAll('[style*="background-color"]')
allHighlightedElements.forEach((el) => {
const element = el as HTMLElement
if (
element.style.backgroundColor.includes("var(--highlight") ||
element.style.backgroundColor.includes("#ffeb3b")
) {
element.style.backgroundColor = ""
element.style.transition = ""
}
})
}
/**