You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, focusing a text box in the Search slider (pop up box) requires JavaScript, because the HTML autofocus attribute only works for elements that are visible at page load, or that are inside a dialog tag.
Describe the solution you'd like
If we use dialog tags instead of div tags to contain the sliders, then the text box inside the Search slider simply needs an autofocus attribute to make it work, with no additional JavaScript beyond the JavaScript that makes the slider open and close.
However, this will require changing the JavaScript in the Co-Design repository that opens and closes sliders, as the autofocus will only trigger upon opening a slider if the slider (dialog element) is opened from JavaScript using .show(). This may conflict with the current approach, which involves adding and removing classes, so this may be a larger change than just the method call.
The file in Co-Design where the JavaScript controls the sliders is js_src/header.ts.
Letting the browser handle the autofocus rather than doing it ourselves in JavaScript will be faster, but it does not appear that the JavaScript delay is significant, or even noticeable, although it may be on slower machines. This probably makes this a low priority.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently, focusing a text box in the Search slider (pop up box) requires JavaScript, because the HTML
autofocus
attribute only works for elements that are visible at page load, or that are inside a dialog tag.Describe the solution you'd like
If we use
dialog
tags instead ofdiv
tags to contain the sliders, then the text box inside the Search slider simply needs anautofocus
attribute to make it work, with no additional JavaScript beyond the JavaScript that makes the slider open and close.However, this will require changing the JavaScript in the Co-Design repository that opens and closes sliders, as the
autofocus
will only trigger upon opening a slider if the slider (dialog
element) is opened from JavaScript using.show()
. This may conflict with the current approach, which involves adding and removing classes, so this may be a larger change than just the method call.The file in Co-Design where the JavaScript controls the sliders is
js_src/header.ts
.Letting the browser handle the autofocus rather than doing it ourselves in JavaScript will be faster, but it does not appear that the JavaScript delay is significant, or even noticeable, although it may be on slower machines. This probably makes this a low priority.
The text was updated successfully, but these errors were encountered: