Commit daa563b5 authored by Erik Luo's avatar Erik Luo Committed by Commit Bot

DevTools: fix cursor style and disabled state for TextPrompt

- Hovering cursor over placeholder text now has correct 'I-beam' style.
- Disabled TextPrompts now look visually different, more transparent,
  consistent with the disabled style on disabled ToolbarButtons.

Screenshot: https://imgur.com/a/FgN8w

Bug: 773964
Change-Id: I87de99d01ac95653dba3eb62299a27ea2ff19de4
Reviewed-on: https://chromium-review.googlesource.com/744725Reviewed-by: default avatarAndrey Kosyakov <caseq@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512700}
parent 3ac8827a
...@@ -210,6 +210,7 @@ UI.TextPrompt = class extends Common.Object { ...@@ -210,6 +210,7 @@ UI.TextPrompt = class extends Common.Object {
this._element.setAttribute('contenteditable', 'plaintext-only'); this._element.setAttribute('contenteditable', 'plaintext-only');
else else
this._element.removeAttribute('contenteditable'); this._element.removeAttribute('contenteditable');
this._element.classList.toggle('disabled', !enabled);
} }
_removeFromElement() { _removeFromElement() {
......
...@@ -46,6 +46,15 @@ ...@@ -46,6 +46,15 @@
display: block; display: block;
} }
::content .text-prompt {
cursor: text;
}
::content .text-prompt.disabled {
opacity: 0.5;
cursor: default;
}
.text-prompt-editing ::content br { .text-prompt-editing ::content br {
display: none; display: none;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment