Update component.jsx

This commit is contained in:
hiroshisuga 2020-10-05 11:26:24 +09:00 committed by GitHub
parent c868beed6a
commit e5f6fe77b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,7 @@ import ZoomTool from './zoom-tool/component';
import FullscreenButtonContainer from '../../fullscreen-button/container';
import TooltipContainer from '/imports/ui/components/tooltip/container';
import QuickPollDropdownContainer from '/imports/ui/components/actions-bar/quick-poll-dropdown/container';
import FullscreenService from '/imports/ui/components/fullscreen-button/service';
import KEY_CODES from '/imports/utils/keyCodes';
const intlMessages = defineMessages({
@ -101,6 +102,7 @@ class PresentationToolbar extends PureComponent {
switchSlide(event) {
const { target, which } = event;
const isBody = target.nodeName === 'BODY';
const { fullscreenRef } = this.props;
if (isBody) {
switch (which) {
@ -112,6 +114,9 @@ class PresentationToolbar extends PureComponent {
case KEY_CODES.PAGE_DOWN:
this.nextSlideHandler();
break;
case KEY_CODES.ENTER:
FullscreenService.toggleFullScreen(fullscreenRef);
break;
default:
}
}