File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
webviews/createPullRequestViewNew Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -173,13 +173,19 @@ export function main() {
173173 }
174174
175175 function openDescriptionSettings ( event : React . MouseEvent | React . KeyboardEvent ) : void {
176+ let shouldExecute = false ;
177+
176178 if ( event . type === 'keydown' ) {
177179 const keyEvent = event as React . KeyboardEvent ;
178180 if ( keyEvent . key === 'Enter' || keyEvent . key === ' ' ) {
179181 event . preventDefault ( ) ;
180- ctx . postMessage ( { command : 'pr.openDescriptionSettings' } ) ;
182+ shouldExecute = true ;
181183 }
182184 } else if ( event . type === 'click' ) {
185+ shouldExecute = true ;
186+ }
187+
188+ if ( shouldExecute ) {
183189 ctx . postMessage ( { command : 'pr.openDescriptionSettings' } ) ;
184190 }
185191 }
@@ -339,7 +345,7 @@ export function main() {
339345
340346 < div className = 'group-description-header' >
341347 < label htmlFor = 'description' className = 'input-title' > Description</ label >
342- < button type = 'button' title = 'Open pull request description settings' className = 'description-settings-action icon-button' onClick = { openDescriptionSettings } onKeyDown = { openDescriptionSettings } tabIndex = { 0 } > { settingsIcon } </ button >
348+ < button type = 'button' title = 'Open pull request description settings' aria-label = 'Open pull request description settings' className = 'description-settings-action icon-button' onClick = { openDescriptionSettings } onKeyDown = { openDescriptionSettings } tabIndex = { 0 } > { settingsIcon } </ button >
343349 </ div >
344350 < div className = 'group-description' >
345351 < textarea
You can’t perform that action at this time.
0 commit comments