| Index: third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js b/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
|
| index a661c55b58ac966ff1cf71918602b4e3a2820148..8113627b4912b4cd035a5989f2c3b949b54080c4 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
|
| @@ -196,6 +196,13 @@ UI.TextPrompt = class extends Common.Object {
|
| this._proxyElement.title = title;
|
| }
|
|
|
| + /**
|
| + * @param {string} placeholder
|
| + */
|
| + setPlaceholder(placeholder) {
|
| + this._element.setAttribute('data-placeholder', placeholder);
|
| + }
|
| +
|
| _removeFromElement() {
|
| this.clearAutocomplete();
|
| this._element.removeEventListener('keydown', this._boundOnKeyDown, false);
|
| @@ -317,11 +324,16 @@ UI.TextPrompt = class extends Common.Object {
|
| }
|
|
|
| clearAutocomplete() {
|
| + var beforeText = this.textWithCurrentSuggestion();
|
| +
|
| if (this._isSuggestBoxVisible())
|
| this._suggestBox.hide();
|
| this._clearAutocompleteTimeout();
|
| this._queryRange = null;
|
| this._refreshGhostText();
|
| +
|
| + if (beforeText !== this.textWithCurrentSuggestion())
|
| + this.dispatchEventToListeners(UI.TextPrompt.Events.ItemApplied);
|
| }
|
|
|
| _refreshGhostText() {
|
|
|