File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -105,9 +105,11 @@ function createSetting(setting = defaultSetting) {
105105 removeSetting ( setting , el ) ;
106106 } ,
107107 } ) ) ;
108- el . attr ( {
109- id : key ,
110- } ) ;
108+ if ( ! el . find ( `#${ key . replaceAll ( '.' , '\\.' ) } ` ) . length ) {
109+ el . attr ( {
110+ id : key ,
111+ } ) ;
112+ }
111113
112114 const label = $ ( `<label for="${ key } ">` ) . html ( setting . name ) ;
113115 const labelPlacement = type . labelFirst ( ) ;
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export default class extends Text {
1212
1313 element ( value , update , {
1414 data = { } ,
15+ key : id ,
1516 } ) {
1617 const labels = {
1718 ...baseLabels ,
@@ -23,7 +24,7 @@ export default class extends Text {
2324 let val = value !== 'Escape' ? value : '' ;
2425 let temp = getLabel ( val ) ;
2526 const ret = $ ( '<div class="keybind-wrapper">' ) ;
26- const input = $ ( ' <input type="text">' )
27+ const input = $ ( ` <input type="text" id=" ${ id } ">` )
2728 . val ( temp )
2829 . on ( 'focus' , ( ) => {
2930 input . val ( '' ) . prop ( 'placeholder' , 'Press Any Key...' ) ;
You can’t perform that action at this time.
0 commit comments