Skip to content

Commit

Permalink
Enter items on double-click.
Browse files Browse the repository at this point in the history
  • Loading branch information
obuchtala committed Apr 23, 2020
1 parent 7b31784 commit d08536e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/SmartFigureEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export default class SmartFigureEditor extends AbstractEditor {
// important not to preventDefault here, as otherwise native mouse stuff, like focussing is not working anymore
el.on('mousedown', domHelpers.stop)
el.on('contextmenu', this._onContextMenu)
el.on('dblclick', this._onDblclick)

return el
}
Expand Down Expand Up @@ -327,6 +328,11 @@ export default class SmartFigureEditor extends AbstractEditor {

}

_onDblclick (e) {
e.stopPropagation()
this._handleEnter(e)
}

_onScroll (event) {
// HACK: Popover needs to reposition on scroll
// we have to provide it with the scroll event
Expand Down

0 comments on commit d08536e

Please sign in to comment.