File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ export function initRepoEditor() {
92
92
} ) ;
93
93
94
94
const $editFilename = $ ( '#file-name' ) ;
95
- $editFilename . on ( 'keyup ' , function ( e ) {
95
+ $editFilename . on ( 'input ' , function ( e ) {
96
96
const $section = $ ( '.breadcrumb span.section' ) ;
97
97
const $divider = $ ( '.breadcrumb div.divider' ) ;
98
98
let value ;
@@ -106,7 +106,7 @@ export function initRepoEditor() {
106
106
$divider . last ( ) . remove ( ) ;
107
107
}
108
108
parts = $ ( this ) . val ( ) . split ( '/' ) ;
109
- if ( e . keyCode === 191 || parts . length > 1 ) {
109
+ if ( parts . length > 1 ) {
110
110
for ( let i = 0 ; i < parts . length ; ++ i ) {
111
111
value = parts [ i ] ;
112
112
if ( i < parts . length - 1 ) {
@@ -131,8 +131,7 @@ export function initRepoEditor() {
131
131
} ) ;
132
132
if ( $ ( this ) . val ( ) ) parts . push ( $ ( this ) . val ( ) ) ;
133
133
$ ( '#tree_path' ) . val ( parts . join ( '/' ) ) ;
134
- } ) . trigger ( 'keyup' ) ;
135
-
134
+ } )
136
135
const $editArea = $ ( '.repository.editor textarea#edit_area' ) ;
137
136
if ( ! $editArea . length ) return ;
138
137
You can’t perform that action at this time.
0 commit comments