mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-06 22:36:07 +00:00
Fix popout to focus first _visible_ field
This commit is contained in:
@@ -8,8 +8,8 @@ export default class PopoutController extends Controller {
|
||||
}
|
||||
|
||||
connect() {
|
||||
this.first_input = this.dialogTarget.querySelector("input");
|
||||
this.displayElements = Array.from(this.element.querySelectorAll('input:not([type="hidden"]'));
|
||||
this.first_input = this.displayElements[0];
|
||||
|
||||
// Show when click or down-arrow on button
|
||||
this.buttonTarget.addEventListener("click", this.show.bind(this));
|
||||
|
||||
Reference in New Issue
Block a user