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
Этот коммит содержится в:
Harrison Healey
2016-10-04 14:38:19 -04:00
коммит произвёл GitHub
родитель b9dc759449
Коммит 816a738d28
10 изменённых файлов: 20 добавлений и 12 удалений

Просмотреть файл

@@ -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();
}
}