Skip to content

Commit 07f1f4c

Browse files
authored
Merge pull request bigbluebutton#24651 from Tainan404/i-22079
Fix(html5): Space bar key problem on WB
2 parents eca131f + 33670a3 commit 07f1f4c

File tree

1 file changed

+6
-2
lines changed
  • bigbluebutton-html5/imports/ui/components/whiteboard

1 file changed

+6
-2
lines changed

bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,9 @@ const Whiteboard = React.memo((props) => {
616616
return;
617617
}
618618

619-
if (key === ' ' && tlEditorRef.current?.getCurrentToolId() !== 'hand' && isPresenterRef.current) {
619+
if (isPresenterRef.current && event.keyCode === KEY_CODES.SPACE && tlEditorRef.current?.getCurrentToolId() !== 'hand') {
620+
event.preventDefault();
621+
event.stopPropagation();
620622
previousTool.current = tlEditorRef.current?.getCurrentToolId();
621623
tlEditorRef.current?.setCurrentTool('hand');
622624
return;
@@ -1830,7 +1832,9 @@ const Whiteboard = React.memo((props) => {
18301832
};
18311833

18321834
const handleKeyUp = (event) => {
1833-
if (event.key === ' ') {
1835+
if (event.keyCode === KEY_CODES.SPACE) {
1836+
event.preventDefault();
1837+
event.stopPropagation();
18341838
if (previousTool.current) {
18351839
tlEditorRef.current?.setCurrentTool(previousTool.current);
18361840
previousTool.current = null;

0 commit comments

Comments
 (0)