PLT-4343 Fixes for mobile main menu (#4148)
* Fixed mobile app link in the main menu to be displayed on mobile browsers * Fixed doubled up dividers in mobile menu * Added scrolling to mobile main menu
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b9dc759449
Коммит
816a738d28
@@ -169,7 +169,7 @@ export default class CreateComment extends React.Component {
|
||||
}
|
||||
|
||||
commentMsgKeyPress(e) {
|
||||
if (!UserAgent.isMobileApp() && ((this.state.ctrlSend && e.ctrlKey) || !this.state.ctrlSend)) {
|
||||
if (!UserAgent.isMobile() && ((this.state.ctrlSend && e.ctrlKey) || !this.state.ctrlSend)) {
|
||||
if (e.which === KeyCodes.ENTER && !e.shiftKey && !e.altKey) {
|
||||
e.preventDefault();
|
||||
ReactDOM.findDOMNode(this.refs.textbox).blur();
|
||||
|
||||
@@ -199,7 +199,7 @@ export default class CreatePost extends React.Component {
|
||||
}
|
||||
|
||||
postMsgKeyPress(e) {
|
||||
if (!UserAgent.isMobileApp() && ((this.state.ctrlSend && e.ctrlKey) || !this.state.ctrlSend)) {
|
||||
if (!UserAgent.isMobile() && ((this.state.ctrlSend && e.ctrlKey) || !this.state.ctrlSend)) {
|
||||
if (e.which === KeyCodes.ENTER && !e.shiftKey && !e.altKey) {
|
||||
e.preventDefault();
|
||||
ReactDOM.findDOMNode(this.refs.textbox).blur();
|
||||
|
||||
@@ -95,7 +95,7 @@ export default class EditPostModal extends React.Component {
|
||||
}
|
||||
|
||||
handleEditKeyPress(e) {
|
||||
if (!UserAgent.isMobileApp() && !this.state.ctrlSend && e.which === KeyCodes.ENTER && !e.shiftKey && !e.altKey) {
|
||||
if (!UserAgent.isMobile() && !this.state.ctrlSend && e.which === KeyCodes.ENTER && !e.shiftKey && !e.altKey) {
|
||||
e.preventDefault();
|
||||
ReactDOM.findDOMNode(this.refs.editbox).blur();
|
||||
this.handleEdit();
|
||||
|
||||
@@ -37,7 +37,7 @@ export default class FilteredChannelList extends React.Component {
|
||||
|
||||
componentDidMount() {
|
||||
// only focus the search box on desktop so that we don't cause the keyboard to open on mobile
|
||||
if (!UserAgent.isMobileApp()) {
|
||||
if (!UserAgent.isMobile()) {
|
||||
ReactDOM.findDOMNode(this.refs.filter).focus();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ class FilteredUserList extends React.Component {
|
||||
|
||||
componentDidMount() {
|
||||
// only focus the search box on desktop so that we don't cause the keyboard to open on mobile
|
||||
if (!UserAgent.isMobileApp()) {
|
||||
if (!UserAgent.isMobile()) {
|
||||
ReactDOM.findDOMNode(this.refs.filter).focus();
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user