diff --git a/bigbluebutton-html5/imports/ui/components/chat/message-form/component.jsx b/bigbluebutton-html5/imports/ui/components/chat/message-form/component.jsx index 85d0c213b78dd15b60ca99960488a23aaceb9de1..37a840db039fb84668b921ecb9a723781b6e750b 100755 --- a/bigbluebutton-html5/imports/ui/components/chat/message-form/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/chat/message-form/component.jsx @@ -2,6 +2,7 @@ import React, { PureComponent } from 'react'; import { defineMessages, injectIntl } from 'react-intl'; import cx from 'classnames'; import TextareaAutosize from 'react-autosize-textarea'; +import browser from 'browser-detect'; import { styles } from './styles'; import Button from '../../button/component'; @@ -42,17 +43,26 @@ class MessageForm extends PureComponent { hasErrors: false, }; + this.BROWSER_RESULTS = browser(); + this.handleMessageChange = this.handleMessageChange.bind(this); this.handleMessageKeyDown = this.handleMessageKeyDown.bind(this); this.handleSubmit = this.handleSubmit.bind(this); } componentDidMount() { - this.textarea.focus(); + const { mobile } = this.BROWSER_RESULTS; + + if (!mobile) { + this.textarea.focus(); + } } componentDidUpdate(prevProps) { - if (prevProps.chatName !== this.props.chatName) { + const { chatName } = this.props; + const { mobile } = this.BROWSER_RESULTS; + + if (prevProps.chatName !== chatName && !mobile) { this.textarea.focus(); } } @@ -102,13 +112,16 @@ class MessageForm extends PureComponent { handleSubmit(e) { e.preventDefault(); - const { disabled, minMessageLength, maxMessageLength } = this.props; - let message = this.state.message.trim(); + const { + disabled, minMessageLength, maxMessageLength, handleSendMessage, + } = this.props; + const { message } = this.state; + let msg = message.trim(); if (disabled - || message.length === 0 - || message.length < minMessageLength - || message.length > maxMessageLength) { + || msg.length === 0 + || msg.length < minMessageLength + || msg.length > maxMessageLength) { this.setState({ hasErrors: true }); return false; } @@ -116,10 +129,10 @@ class MessageForm extends PureComponent { // Sanitize. See: http://shebang.brandonmintern.com/foolproof-html-escaping-in-javascript/ const div = document.createElement('div'); - div.appendChild(document.createTextNode(message)); - message = div.innerHTML; + div.appendChild(document.createTextNode(msg)); + msg = div.innerHTML; - return this.props.handleSendMessage(message) + return handleSendMessage(msg) .then(() => this.setState({ message: '', hasErrors: false, @@ -128,24 +141,24 @@ class MessageForm extends PureComponent { render() { const { - intl, chatTitle, chatName, disabled, + intl, chatTitle, chatName, disabled, className, chatAreaId, } = this.props; - const { hasErrors, error } = this.state; + const { hasErrors, error, message } = this.state; return ( <form ref={(ref) => { this.form = ref; }} - className={cx(this.props.className, styles.form)} + className={cx(className, styles.form)} onSubmit={this.handleSubmit} > <div className={styles.wrapper}> <TextareaAutosize className={styles.input} id="message-input" - innerRef={ref => (this.textarea = ref)} + innerRef={(ref) => { this.textarea = ref; return this.textarea; }} placeholder={intl.formatMessage(messages.inputPlaceholder, { 0: chatName })} - aria-controls={this.props.chatAreaId} + aria-controls={chatAreaId} aria-label={intl.formatMessage(messages.inputLabel, { 0: chatTitle })} aria-invalid={hasErrors ? 'true' : 'false'} aria-describedby={hasErrors ? 'message-input-error' : null} @@ -153,7 +166,7 @@ class MessageForm extends PureComponent { autoComplete="off" spellCheck="true" disabled={disabled} - value={this.state.message} + value={message} onChange={this.handleMessageChange} onKeyDown={this.handleMessageKeyDown} /> diff --git a/bigbluebutton-html5/imports/ui/components/chat/message-form/styles.scss b/bigbluebutton-html5/imports/ui/components/chat/message-form/styles.scss index b96a30df5168eab34d7ed739c1086a2b3b11727e..0adbdf9e2a7e4bdb2fc17145616d8760cbfe61fa 100755 --- a/bigbluebutton-html5/imports/ui/components/chat/message-form/styles.scss +++ b/bigbluebutton-html5/imports/ui/components/chat/message-form/styles.scss @@ -62,7 +62,7 @@ min-height: 2.5rem; max-height: 10rem; border: 1px solid var(--color-gray-lighter); - box-shadow: 0 0 0 2px var(--color-gray-lighter); + box-shadow: 0 0 0 1px var(--color-gray-lighter); &:disabled, &[disabled] { diff --git a/bigbluebutton-html5/imports/ui/components/tooltip/component.jsx b/bigbluebutton-html5/imports/ui/components/tooltip/component.jsx index 0798908ef868020b09d1643baad48f20484d9976..874efac55d3acabdda311f7bc057258a7b73514b 100755 --- a/bigbluebutton-html5/imports/ui/components/tooltip/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/tooltip/component.jsx @@ -23,6 +23,7 @@ class Tooltip extends Component { const expandedEl = tooltipTarget.parentElement.querySelector('[aria-expanded="true"]'); const isTarget = expandedEl === tooltipTarget; if (expandedEl && !isTarget) return; + tip.set({ content: tooltipTarget.lastChild.innerText }); tip.show(); } diff --git a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/breakout-room/component.jsx b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/breakout-room/component.jsx index 57eeb2d6f715c6aaf17e94d90cf5e7cfb23a2241..f00639a1320fd79f5918a41fd8f8c84b05665700 100644 --- a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/breakout-room/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/breakout-room/component.jsx @@ -26,12 +26,18 @@ const BreakoutRoomItem = ({ }) => { if (hasBreakoutRoom) { return ( - <div role="button" onClick={toggleBreakoutPanel}> + <div> <h2 className={styles.smallTitle}> {intl.formatMessage(intlMessages.breakoutTitle).toUpperCase()} </h2> - <div className={styles.BreakoutRoomsItem}> - <div className={styles.BreakoutRoomsContents}> + <div + role="button" + tabIndex={0} + onClick={toggleBreakoutPanel} + className={styles.BreakoutRoomsItem} + aria-label={intl.formatMessage(intlMessages.breakoutTitle)} + > + <div className={styles.BreakoutRoomsContents} aria-hidden> <div className={styles.BreakoutRoomsIcon}> <Icon iconName="rooms" /> </div> diff --git a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/breakout-room/styles.scss b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/breakout-room/styles.scss index e66b3a9432b8f63c7a6b711593efc0ea3901189f..76c1e6543f030b2cfcecc27e159d453228d7abf1 100644 --- a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/breakout-room/styles.scss +++ b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/breakout-room/styles.scss @@ -40,6 +40,7 @@ .BreakoutRoomsItem { @extend %list-item; margin-left: 0.375rem; + padding-left: var(--lg-padding-y); } .link { diff --git a/bigbluebutton-html5/private/locales/en.json b/bigbluebutton-html5/private/locales/en.json index e47b002d4fad3a0ac03ee5aaf3aaaba672decc2e..d944bf09b13a3bd613ea57ba05468db1702c3450 100755 --- a/bigbluebutton-html5/private/locales/en.json +++ b/bigbluebutton-html5/private/locales/en.json @@ -1,6 +1,6 @@ { "app.home.greeting": "Your presentation will begin shortly...", - "app.chat.submitLabel": "Send Message", + "app.chat.submitLabel": "Send message", "app.chat.errorMinMessageLength": "The message is {0} characters(s) too short", "app.chat.errorMaxMessageLength": "The message is {0} characters(s) too long", "app.chat.inputLabel": "Message input for chat {0}", @@ -11,7 +11,7 @@ "app.chat.closeChatLabel": "Close {0}", "app.chat.hideChatLabel": "Hide {0}", "app.chat.moreMessages": "More messages below", - "app.chat.dropdown.options": "Chat Options", + "app.chat.dropdown.options": "Chat options", "app.chat.dropdown.clear": "Clear", "app.chat.dropdown.copy": "Copy", "app.chat.dropdown.save": "Save", @@ -39,7 +39,7 @@ "app.userList.userAriaLabel": "{0} {1} {2} Status {3}", "app.userList.menu.promoteUser.label": "Promote to moderator", "app.userList.menu.demoteUser.label": "Demote to viewer", - "app.userList.userOptions.manageUsersLabel": "Manage Users", + "app.userList.userOptions.manageUsersLabel": "Manage users", "app.userList.userOptions.muteAllLabel": "Mute all users", "app.userList.userOptions.muteAllDesc": "Mutes all users in the meeting", "app.userList.userOptions.clearAllLabel": "Clear all status icons", @@ -73,7 +73,7 @@ "app.presentation.presentationToolbar.zoomOutLabel": "Zoom out", "app.presentation.presentationToolbar.zoomOutDesc": "Zoom out of the presentation", "app.presentation.presentationToolbar.zoomIndicator": "Show the zoom percentage", - "app.presentation.presentationToolbar.fitToWidth": "Fit to Width", + "app.presentation.presentationToolbar.fitToWidth": "Fit to width", "app.presentation.presentationToolbar.goToSlide": "Slide {0}", "app.presentationUploder.title": "Presentation", "app.presentationUploder.message": "As a presenter in BigBlueButton, you have the ability of uploading any office document or PDF file. We recommend for the best results, to please upload a PDF file.", @@ -135,7 +135,7 @@ "app.navBar.settingsDropdown.hotkeysDesc": "Listing of available hotkeys", "app.navBar.settingsDropdown.helpLabel": "Help", "app.navBar.settingsDropdown.helpDesc": "Links user to video tutorials", - "app.navBar.userListToggleBtnLabel": "User List Toggle", + "app.navBar.userListToggleBtnLabel": "User list toggle", "app.navBar.toggleUserList.ariaLabel": "Users and Messages Toggle", "app.navBar.toggleUserList.newMessages": "with new message notification", "app.navBar.recording": "This session is being recorded", @@ -167,8 +167,8 @@ "app.submenu.application.audioAlertLabel": "Audio Alerts for Chat", "app.submenu.application.pushAlertLabel": "Popup Alerts for Chat", "app.submenu.application.fontSizeControlLabel": "Font size", - "app.submenu.application.increaseFontBtnLabel": "Increase Application Font Size", - "app.submenu.application.decreaseFontBtnLabel": "Decrease Application Font Size", + "app.submenu.application.increaseFontBtnLabel": "Increase application font size", + "app.submenu.application.decreaseFontBtnLabel": "Decrease application font size", "app.submenu.application.languageLabel": "Application Language", "app.submenu.application.ariaLanguageLabel": "Change Application Language", "app.submenu.application.languageOptionLabel": "Choose language", @@ -315,8 +315,8 @@ "app.audioManager.requestTimeout": "Error: There was a timeout in the request", "app.audioManager.invalidTarget": "Error: Tried to request something to an invalid target", "app.audioManager.mediaError": "Error: There was an issue getting your media devices", - "app.audio.joinAudio": "Join Audio", - "app.audio.leaveAudio": "Leave Audio", + "app.audio.joinAudio": "Join audio", + "app.audio.leaveAudio": "Leave audio", "app.audio.enterSessionLabel": "Enter Session", "app.audio.playSoundLabel": "Play Sound", "app.audio.backLabel": "Back", @@ -443,8 +443,8 @@ "app.whiteboard.toolbar.color.violet": "Violet", "app.whiteboard.toolbar.color.magenta": "Magenta", "app.whiteboard.toolbar.color.silver": "Silver", - "app.whiteboard.toolbar.undo": "Undo Annotation", - "app.whiteboard.toolbar.clear": "Clear All Annotations", + "app.whiteboard.toolbar.undo": "Undo annotation", + "app.whiteboard.toolbar.clear": "Clear all annotations", "app.whiteboard.toolbar.multiUserOn": "Turn multi-user mode on", "app.whiteboard.toolbar.multiUserOff": "Turn multi-user mode off", "app.whiteboard.toolbar.fontSize": "Font Size List",