Skip to content

Commit

Permalink
Merge pull request #327 from NinaRoeckeleinSWM/saveonenter
Browse files Browse the repository at this point in the history
Save Bookmarks on Enter
  • Loading branch information
manisandro committed Jul 4, 2024
2 parents 8058709 + 3d4c36a commit f39e50f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/Bookmark.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ class Bookmark extends React.Component {
<div className="bookmark-body" role="body">
<h4>{LocaleUtils.tr("bookmark.manage")}</h4>
<div className="bookmark-create">
<input onChange={ev => this.setState({description: ev.target.value})} placeholder={placeholder} type="text" value={this.state.description} />
<input onChange={ev => this.setState({description: ev.target.value})}
onKeyDown={ev => {if (ev.key === "Enter" && this.state.description !== "") { this.addBookmark(); }}}
placeholder={placeholder} type="text" value={this.state.description} />
</div>
<div className="bookmark-actions">
<span className="bookmark-actions-buttonbox">
Expand Down

0 comments on commit f39e50f

Please sign in to comment.