mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Create fake placeholder
This commit is contained in:
parent
ac727eb492
commit
0009357496
3 changed files with 8 additions and 1 deletions
|
|
@ -248,6 +248,9 @@ export default function DHApplicationMixin(Base) {
|
|||
input.addEventListener("keydown", event => {
|
||||
if (event.key === "Enter") input.blur();
|
||||
});
|
||||
|
||||
// Chrome sometimes add <br>, which aren't a problem for the value but are for the placeholder
|
||||
input.addEventListener("input", () => input.querySelectorAll("br").forEach((i) => i.remove()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,10 @@
|
|||
|
||||
.input[contenteditable] {
|
||||
cursor: var(--cursor-text);
|
||||
&:empty:before {
|
||||
color: light-dark(@dark-40, @beige-50);
|
||||
content: attr(placeholder);
|
||||
}
|
||||
}
|
||||
|
||||
input[type='checkbox'],
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<header class='adversary-header-sheet'>
|
||||
<line-div></line-div>
|
||||
<div class="name-row">
|
||||
<h1 class='input actor-name' contenteditable="plaintext-only" data-property="name">{{source.name}}</h1>
|
||||
<h1 class='input actor-name' contenteditable="plaintext-only" data-property="name" placeholder="{{localize "DAGGERHEART.GENERAL.actorName"}}">{{source.name}}</h1>
|
||||
</div>
|
||||
<div class="tags">
|
||||
<div class="tag">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue