Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js

Issue 2859623002: DevTools: Migrate from -webkit-user-modify to contenteditable (Closed)
Patch Set: Add contenteditable on attach Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 3ef2086d504dce95ff224329a44c7429afebe49d..678d1e9b468d3e33ea7908f1e0bb0968123bb999 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
@@ -115,6 +115,7 @@ UI.TextPrompt = class extends Common.Object {
element.parentElement.insertBefore(this._proxyElement, element);
this._proxyElement.appendChild(element);
this._element.classList.add('text-prompt');
+ this._element.setAttribute('contenteditable', 'plaintext-only');
this._element.addEventListener('keydown', this._boundOnKeyDown, false);
this._element.addEventListener('input', this._boundOnInput, false);
this._element.addEventListener('mousewheel', this._boundOnMouseWheel, false);
@@ -136,6 +137,7 @@ UI.TextPrompt = class extends Common.Object {
this._proxyElement.remove();
delete this._proxyElement;
this._element.classList.remove('text-prompt');
+ this._element.removeAttribute('contenteditable');
}
/**

Powered by Google App Engine
This is Rietveld 408576698