Index: Source/WebCore/inspector/front-end/StylesSidebarPane.js |
=================================================================== |
--- Source/WebCore/inspector/front-end/StylesSidebarPane.js (revision 80114) |
+++ Source/WebCore/inspector/front-end/StylesSidebarPane.js (working copy) |
@@ -1709,10 +1709,6 @@ |
editingEnded: function(context) |
{ |
- if (this._prompt) { |
- this._prompt.removeFromElement(); |
- delete this._prompt; |
- } |
this.hasChildren = context.hasChildren; |
if (context.expanded) |
this.expand(); |
@@ -1727,6 +1723,7 @@ |
editingCancelled: function(element, context) |
{ |
+ this._removePrompt(); |
if ("originalPropertyText" in this) |
this.applyStyleText(this.originalPropertyText, true); |
else { |
@@ -1742,6 +1739,7 @@ |
editingCommitted: function(element, userInput, previousContent, context, moveDirection) |
{ |
+ this._removePrompt(); |
this.editingEnded(context); |
var isEditingName = context.isEditingName; |
@@ -1839,6 +1837,15 @@ |
} |
}, |
+ _removePrompt: function() |
+ { |
+ // BUG 53242. This cannot go into editingEnded(), as it should always happen first for any editing outcome. |
+ if (this._prompt) { |
+ this._prompt.removeFromElement(); |
+ delete this._prompt; |
+ } |
+ }, |
+ |
_hasBeenAppliedToPageViaUpDown: function() |
{ |
// New properties applied via up/down have an originalPropertyText and will be deleted later |