Skip to content

Commit b884a65

Browse files
committed
fix fullscreen button steals keyboard focus away from the canvas
Fixes #300.
1 parent 5eeae29 commit b884a65

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pages/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,10 @@ class Index extends React.Component {
686686
}
687687

688688
handleToggleFullscreen = () => {
689+
// return focus to the document body. This remove focus from the fullscreen
690+
// icon button and allows keyboard shortcuts in the graph to continue to
691+
// work.
692+
document.activeElement.blur();
689693
this.setState((state) => ({
690694
fullscreen: !state.fullscreen,
691695
}));

0 commit comments

Comments
 (0)