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

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

Issue 2615933002: DevTools: Don't show blank placeholder in TextPrompt (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/textPrompt.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8113627b4912b4cd035a5989f2c3b949b54080c4..896824713aae1ac05ad5ee80d6e7ad8712cbecff 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
@@ -200,7 +200,10 @@ UI.TextPrompt = class extends Common.Object {
* @param {string} placeholder
*/
setPlaceholder(placeholder) {
- this._element.setAttribute('data-placeholder', placeholder);
+ if (placeholder)
+ this._element.setAttribute('data-placeholder', placeholder);
+ else
+ this._element.removeAttribute('data-placeholder');
}
_removeFromElement() {
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/textPrompt.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698