Skip to content

Commit f0cc1f4

Browse files
committed
fix: remove properties after setting values
1 parent bf9a787 commit f0cc1f4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -965,10 +965,10 @@ function RemoteFunctions(config) {
965965
if (event && event.target && event.target.nodeType === Node.ELEMENT_NODE && event.target.hasAttribute("data-brackets-id")) {
966966
if (event.target._originalBackgroundColor !== undefined) {
967967
event.target.style.backgroundColor = event.target._originalBackgroundColor;
968-
delete event.target._originalBackgroundColor;
969968
} else {
970969
event.target.style.backgroundColor = "";
971970
}
971+
delete event.target._originalBackgroundColor;
972972
}
973973

974974
// Remove info box when mouse leaves the element
@@ -986,7 +986,6 @@ function RemoteFunctions(config) {
986986
function onClick(event) {
987987
// make sure that the feature is enabled and also the clicked element has the attribute 'data-brackets-id'
988988
if(isFlagActive && event.target.hasAttribute('data-brackets-id')) {
989-
//console.log("event:", event);
990989
if(_nodeMoreOptionsBox) {
991990
_nodeMoreOptionsBox.remove();
992991
_nodeMoreOptionsBox = null;
@@ -996,10 +995,10 @@ function RemoteFunctions(config) {
996995
if (previouslyClickedElement) {
997996
if (previouslyClickedElement._originalOutline !== undefined) {
998997
previouslyClickedElement.style.outline = previouslyClickedElement._originalOutline;
999-
delete previouslyClickedElement._originalOutline;
1000998
} else {
1001999
previouslyClickedElement.style.outline = "";
10021000
}
1001+
delete previouslyClickedElement._originalOutline;
10031002
}
10041003

10051004
_nodeMoreOptionsBox = new NodeMoreOptionsBox(event.target);

0 commit comments

Comments
 (0)