File tree Expand file tree Collapse file tree 1 file changed +0
-10
lines changed
app/javascript/controllers/syntax-highlight Expand file tree Collapse file tree 1 file changed +0
-10
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ import debug from '../../utils/debug';
4
4
5
5
const console = debug ( 'app:javascript:controllers:syntax-highlight:preview' ) ;
6
6
7
- let submitting = false ;
8
-
9
7
export default class extends Controller {
10
8
static values = {
11
9
name : String , // The name of the syntax highlight css file to enable
@@ -26,19 +24,11 @@ export default class extends Controller {
26
24
} ) ;
27
25
link . disabled = name !== link . dataset . syntaxHighlight ;
28
26
} ) ;
29
-
30
- if ( submitting ) {
31
- this . selectTarget . focus ( ) ;
32
- submitting = false ;
33
- }
34
27
}
35
28
36
29
change ( event ) {
37
30
if ( event . target . form ) {
38
31
event . target . form . requestSubmit ( ) ;
39
-
40
- // This is some hacky module state so that we can retain the focus on the re-rendered select element after a submit
41
- submitting = true ;
42
32
}
43
33
}
44
34
}
You can’t perform that action at this time.
0 commit comments