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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/InplaceEditor.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/InplaceEditor.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/InplaceEditor.js b/third_party/WebKit/Source/devtools/front_end/ui/InplaceEditor.js
index 963a687e11bef5993c5901085b5dbb909b074b1f..794ef4c6639b9e0574da4237cd6eff1b6a49840b 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/InplaceEditor.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/InplaceEditor.js
@@ -30,6 +30,7 @@ UI.InplaceEditor = class {
setUpEditor(editingContext) {
var element = editingContext.element;
element.classList.add('editing');
+ element.setAttribute('contenteditable', 'plaintext-only');
var oldTabIndex = element.getAttribute('tabIndex');
if (typeof oldTabIndex !== 'number' || oldTabIndex < 0)
@@ -41,6 +42,7 @@ UI.InplaceEditor = class {
closeEditor(editingContext) {
var element = editingContext.element;
element.classList.remove('editing');
+ element.removeAttribute('contenteditable');
if (typeof editingContext.oldTabIndex !== 'number')
element.removeAttribute('tabIndex');

Powered by Google App Engine
This is Rietveld 408576698