From bafd699fe43cfa433897c4a921f60f7b94774b66 Mon Sep 17 00:00:00 2001 From: llj Date: Sun, 26 Sep 2021 17:28:36 +0800 Subject: [PATCH] [a11y] repo history: added support for 'keyboard access' --- frontend/src/repo-history.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/frontend/src/repo-history.js b/frontend/src/repo-history.js index 7702581ac6..f0778a56f7 100644 --- a/frontend/src/repo-history.js +++ b/frontend/src/repo-history.js @@ -105,7 +105,7 @@ class RepoHistory extends React.Component {

- + {userPerm == 'rw' &&

{gettext('Tip: a snapshot will be generated after modification, which records the library state after the modification.')}

} @@ -234,7 +234,8 @@ class Item extends React.Component { }); } - editLabel = () => { + editLabel = (e) => { + e.preventDefault(); this.setState({ isCommitLabelUpdateDialogOpen: !this.state.isCommitLabelUpdateDialogOpen }); @@ -269,11 +270,11 @@ class Item extends React.Component { return ( - + {item.description} {item.showDetails && - {gettext('Details')} + {gettext('Details')} } {moment(item.time).format('YYYY-MM-DD')} @@ -287,7 +288,7 @@ class Item extends React.Component { return {item}; })} {userPerm == 'rw' && - + } }