mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fix for styling with a blank value
It's not usually valid, but can still be entered. I wasn't able to fix the positioning of the :after psuedo element without having a child text node. Maybe it's possible to add an empty child text node, but I didn't think it worth getting down to that level..
This commit is contained in:
@@ -43,6 +43,8 @@ export default class PopoutController extends Controller {
|
||||
// Show, and apply value if it's a digit or word character
|
||||
this.show(e);
|
||||
this.first_input.value = e.key;
|
||||
// Notify of change
|
||||
this.first_input.dispatchEvent(new Event("input"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +59,7 @@ export default class PopoutController extends Controller {
|
||||
|
||||
// Update button to represent any changes
|
||||
this.buttonTarget.innerText = this.#displayValue();
|
||||
this.buttonTarget.innerHTML ||= " "; // (with default space to help with styling)
|
||||
this.buttonTarget.classList.toggle("changed", this.#isChanged());
|
||||
|
||||
this.dialogTarget.style.display = "none";
|
||||
|
||||
Reference in New Issue
Block a user