DevTools: [SSP] consume event if it inserts a new property

Currently, if you click on the selector container, there are two
handlers that conflict with each other. The patch fixes
the conflict.

BUG=413894
R=vsevik, apavlov@chromium.org

Review URL: https://codereview.chromium.org/571653002

git-svn-id: svn://svn.chromium.org/blink/trunk@181963 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 95bc63ed
......@@ -1599,8 +1599,10 @@ WebInspector.StylePropertiesSection.prototype = {
{
if (this._checkWillCancelEditing() || !this.editable)
return;
if (event.target === this._selectorContainer)
if (event.target === this._selectorContainer) {
this.addNewBlankProperty(0).startEditing();
event.consume(true);
}
},
/**
......@@ -1697,6 +1699,7 @@ WebInspector.StylePropertiesSection.prototype = {
}
this.expand();
this.addNewBlankProperty().startEditing();
event.consume(true)
},
_handleSelectorClick: function(event)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment