77 RebaseDidAbortCommandType ,
88 RebaseDidChangeEntryCommandType ,
99 RebaseDidChangeNotificationType ,
10+ RebaseDidDisableCommandType ,
1011 RebaseDidMoveEntryCommandType ,
1112 RebaseDidStartCommandType ,
1213 RebaseEntry ,
@@ -124,6 +125,7 @@ class RebaseEditor extends App<RebaseState> {
124125 } ) ,
125126 DOM . on ( '[data-action="start"]' , 'click' , ( ) => this . onStartClicked ( ) ) ,
126127 DOM . on ( '[data-action="abort"]' , 'click' , ( ) => this . onAbortClicked ( ) ) ,
128+ DOM . on ( '[data-action="disable"]' , 'click' , ( ) => this . onDisableClicked ( ) ) ,
127129 DOM . on ( 'li[data-ref]' , 'keydown' , function ( this : Element , e : KeyboardEvent ) {
128130 if ( ( e . target as HTMLElement ) . matches ( 'select[data-ref]' ) ) {
129131 if ( e . key === 'Escape' ) {
@@ -134,6 +136,10 @@ class RebaseEditor extends App<RebaseState> {
134136 }
135137
136138 if ( e . key === 'Enter' || e . key === ' ' ) {
139+ if ( e . key === 'Enter' && ( e . target as HTMLElement ) . matches ( 'a.entry-ref' ) ) {
140+ return ;
141+ }
142+
137143 const $select = ( this as HTMLLIElement ) . querySelectorAll < HTMLSelectElement > ( 'select[data-ref]' ) [ 0 ] ;
138144 if ( $select != null ) {
139145 $select . focus ( ) ;
@@ -224,6 +230,10 @@ class RebaseEditor extends App<RebaseState> {
224230 this . sendCommand ( RebaseDidAbortCommandType , { } ) ;
225231 }
226232
233+ private onDisableClicked ( ) {
234+ this . sendCommand ( RebaseDidDisableCommandType , { } ) ;
235+ }
236+
227237 private onSelectChanged ( $el : HTMLSelectElement ) {
228238 const ref = $el . dataset . ref ;
229239 if ( ref ) {
@@ -367,6 +377,8 @@ class RebaseEditor extends App<RebaseState> {
367377 $select . appendChild ( option ) ;
368378 }
369379 $selectContainer . appendChild ( $select ) ;
380+ } else {
381+ $entry . tabIndex = - 1 ;
370382 }
371383
372384 const $message = document . createElement ( 'span' ) ;
0 commit comments