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

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: 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..24b008cadd258c11f3af1b5e128b287aae58319e 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
@@ -216,6 +216,7 @@ UI.TextPrompt = class extends Common.Object {
*/
_startEditing(blurListener) {
this._isEditing = true;
+ this._element.setAttribute('contenteditable', 'plaintext-only');
this._contentElement.classList.add('text-prompt-editing');
if (blurListener) {
this._blurListener = blurListener;
@@ -234,6 +235,7 @@ UI.TextPrompt = class extends Common.Object {
if (this._blurListener)
this._element.removeEventListener('blur', this._blurListener, false);
this._contentElement.classList.remove('text-prompt-editing');
+ this._element.removeAttribute('contenteditable');
delete this._isEditing;
}

Powered by Google App Engine
This is Rietveld 408576698