From 17ccd17e5435a20d77a21711761c73b37e897533 Mon Sep 17 00:00:00 2001 From: Bobak Oftadeh <bobakoftadeh@outlook.com> Date: Thu, 3 Jan 2019 21:09:00 +0000 Subject: [PATCH] Fixed focus on record button --- .../imports/ui/components/nav-bar/component.jsx | 14 ++++++-------- .../nav-bar/recording-indicator/component.jsx | 4 ++-- bigbluebutton-html5/private/config/settings.yml | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/nav-bar/component.jsx b/bigbluebutton-html5/imports/ui/components/nav-bar/component.jsx index ff9ff408ce..b90ed8e86f 100755 --- a/bigbluebutton-html5/imports/ui/components/nav-bar/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/nav-bar/component.jsx @@ -75,8 +75,6 @@ const defaultProps = { shortcuts: '', }; -const interval = null; - const openBreakoutJoinConfirmation = (breakout, breakoutName, mountModal) => mountModal( <BreakoutJoinConfirmation breakout={breakout} @@ -101,8 +99,8 @@ class NavBar extends PureComponent { } componentDidMount() { - if (Meteor.settings.public.allowOutsideCommands.toggleRecording || - getFromUserSettings('outsideToggleRecording', false)) { + if (Meteor.settings.public.allowOutsideCommands.toggleRecording + || getFromUserSettings('outsideToggleRecording', false)) { ActionBarService.connectRecordingObserver(); window.addEventListener('message', ActionBarService.processOutsideToggleRecording); } @@ -154,7 +152,7 @@ class NavBar extends PureComponent { } componentWillUnmount() { - clearInterval(interval); + clearInterval(this.interval); } handleToggleUserList() { @@ -293,10 +291,10 @@ class NavBar extends PureComponent { <RecordingIndicator {...recordProps} title={intl.formatMessage(intlMessages[recordingMessage])} - buttonTitle={(!recordProps.recording ? intl.formatMessage(intlMessages.startTitle) : - intl.formatMessage(intlMessages.stopTitle))} + buttonTitle={(!recordProps.recording ? intl.formatMessage(intlMessages.startTitle) + : intl.formatMessage(intlMessages.stopTitle))} mountModal={mountModal} - time= {time} + time={time} /> </div> <div className={styles.right}> diff --git a/bigbluebutton-html5/imports/ui/components/nav-bar/recording-indicator/component.jsx b/bigbluebutton-html5/imports/ui/components/nav-bar/recording-indicator/component.jsx index b005473115..7da7efadae 100755 --- a/bigbluebutton-html5/imports/ui/components/nav-bar/recording-indicator/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/nav-bar/recording-indicator/component.jsx @@ -1,10 +1,9 @@ import React from 'react'; -import { defineMessages, injectIntl } from 'react-intl'; import Button from '/imports/ui/components/button/component'; import RecordingContainer from '/imports/ui/components/recording/container'; import humanizeSeconds from '/imports/utils/humanizeSeconds'; -import { styles } from './styles'; import cx from 'classnames'; +import { styles } from './styles'; const RecordingIndicator = ({ record, title, recording, buttonTitle, mountModal, time, @@ -24,6 +23,7 @@ const RecordingIndicator = ({ className={cx(styles.btn, recording ? styles.recordIndicator : styles.notRecording)} onClick={() => { mountModal(<RecordingContainer />); + document.activeElement.blur(); }} /> </div> diff --git a/bigbluebutton-html5/private/config/settings.yml b/bigbluebutton-html5/private/config/settings.yml index e3ba3056e5..69808d4d0b 100755 --- a/bigbluebutton-html5/private/config/settings.yml +++ b/bigbluebutton-html5/private/config/settings.yml @@ -100,7 +100,7 @@ public: enableListenOnly: false autoShareWebcam: false allowOutsideCommands: - toggleRecording: true + toggleRecording: false toggleSelfVoice: false poll: max_custom: 5 -- GitLab