File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
# CHANGELOG.md
2
2
3
- ## 0.20.5 ( unreleased)
3
+ ## unreleased
4
4
5
5
- Fix missing visual indication of selected item in form dropdown fields.
6
6
- ![ screenshot] ( https://github.com/tabler/tabler/assets/552629/a575db2f-e210-4984-a786-5727687ac037 )
7
-
7
+ - fix autofocus on select fields with dropdown
8
8
9
9
## 0.20.4 (2024-04-23)
10
10
Original file line number Diff line number Diff line change 2
2
3
3
function sqlpage_select_dropdown ( ) {
4
4
for ( const s of document . querySelectorAll ( "[data-pre-init=select-dropdown]" ) ) {
5
- new TomSelect ( s , {
5
+ // See: https://github.com/orchidjs/tom-select/issues/716
6
+ // By default, TomSelect will not retain the focus if s is already focused
7
+ // This is a workaround to fix that
8
+ const is_focused = s === document . activeElement ;
9
+ const tom = new TomSelect ( s , {
6
10
create : s . dataset . create_new
7
11
} ) ;
12
+ if ( is_focused ) tom . focus ( ) ;
8
13
}
9
14
}
10
15
You can’t perform that action at this time.
0 commit comments