diff options
Diffstat (limited to 'app/javascript/mastodon/features')
5 files changed, 10 insertions, 13 deletions
diff --git a/app/javascript/mastodon/features/compose/components/compose_form.js b/app/javascript/mastodon/features/compose/components/compose_form.js index ff22a2953..f965e6c75 100644 --- a/app/javascript/mastodon/features/compose/components/compose_form.js +++ b/app/javascript/mastodon/features/compose/components/compose_form.js @@ -34,10 +34,6 @@ const messages = defineMessages({ export default @injectIntl class ComposeForm extends ImmutablePureComponent { - setRef = c => { - this.composeForm = c; - }; - static contextTypes = { router: PropTypes.object, }; @@ -120,7 +116,9 @@ class ComposeForm extends ImmutablePureComponent { } handleFocus = () => { - this.composeForm.scrollIntoView(); + if (this.composeForm) { + this.composeForm.scrollIntoView(); + } } componentDidUpdate (prevProps) { @@ -164,6 +162,10 @@ class ComposeForm extends ImmutablePureComponent { this.spoilerText = c; } + setRef = c => { + this.composeForm = c; + }; + handleEmojiPick = (data) => { const { text } = this.props; const position = this.autosuggestTextarea.textarea.selectionStart; diff --git a/app/javascript/mastodon/features/compose/components/privacy_dropdown.js b/app/javascript/mastodon/features/compose/components/privacy_dropdown.js index 3288f81f8..d02a55be0 100644 --- a/app/javascript/mastodon/features/compose/components/privacy_dropdown.js +++ b/app/javascript/mastodon/features/compose/components/privacy_dropdown.js @@ -129,7 +129,7 @@ class PrivacyDropdownMenu extends React.PureComponent { // It should not be transformed when mounting because the resulting // size will be used to determine the coordinate of the menu by // react-overlays - <div className={`privacy-dropdown__dropdown ${placement}`} style={{ ...style, opacity: opacity, transform: mounted ? `scale(${scaleX}, ${scaleY})` : null }} role='listbox' ref={this.setRef}> + <div className={`privacy-dropdown__dropdown ${placement}`} style={{ ...style, opacity: opacity, transform: mounted ? `scale(${scaleX}, ${scaleY})` : null, zIndex: 2 }} role='listbox' ref={this.setRef}> {items.map(item => ( <div role='option' tabIndex='0' key={item.value} data-index={item.value} onKeyDown={this.handleKeyDown} onClick={this.handleClick} className={classNames('privacy-dropdown__option', { active: item.value === value })} aria-selected={item.value === value} ref={item.value === value ? this.setFocusRef : null}> <div className='privacy-dropdown__option__icon'> diff --git a/app/javascript/mastodon/features/list_timeline/index.js b/app/javascript/mastodon/features/list_timeline/index.js index ad7d16f95..0db6d2228 100644 --- a/app/javascript/mastodon/features/list_timeline/index.js +++ b/app/javascript/mastodon/features/list_timeline/index.js @@ -175,8 +175,6 @@ class ListTimeline extends React.PureComponent { <Icon id='trash' /> <FormattedMessage id='lists.delete' defaultMessage='Delete list' /> </button> </div> - - <hr /> </ColumnHeader> <StatusListContainer diff --git a/app/javascript/mastodon/features/lists/index.js b/app/javascript/mastodon/features/lists/index.js index 24f40c16b..015e21b68 100644 --- a/app/javascript/mastodon/features/lists/index.js +++ b/app/javascript/mastodon/features/lists/index.js @@ -65,11 +65,11 @@ class Lists extends ImmutablePureComponent { <NewListForm /> - <ColumnSubheading text={intl.formatMessage(messages.subheading)} /> <ScrollableList scrollKey='lists' shouldUpdateScroll={shouldUpdateScroll} emptyMessage={emptyMessage} + prepend={<ColumnSubheading text={intl.formatMessage(messages.subheading)} />} > {lists.map(list => <ColumnLink key={list.get('id')} to={`/timelines/list/${list.get('id')}`} icon='list-ul' text={list.get('title')} /> diff --git a/app/javascript/mastodon/features/status/components/detailed_status.js b/app/javascript/mastodon/features/status/components/detailed_status.js index 9089eb303..c7aa4d033 100644 --- a/app/javascript/mastodon/features/status/components/detailed_status.js +++ b/app/javascript/mastodon/features/status/components/detailed_status.js @@ -13,7 +13,6 @@ import Video from '../../video'; import scheduleIdleTask from '../../ui/util/schedule_idle_task'; import classNames from 'classnames'; import Icon from 'mastodon/components/icon'; -import PollContainer from 'mastodon/containers/poll_container'; export default class DetailedStatus extends ImmutablePureComponent { @@ -107,9 +106,7 @@ export default class DetailedStatus extends ImmutablePureComponent { outerStyle.height = `${this.state.height}px`; } - if (status.get('poll')) { - media = <PollContainer pollId={status.get('poll')} />; - } else if (status.get('media_attachments').size > 0) { + if (status.get('media_attachments').size > 0) { if (status.getIn(['media_attachments', 0, 'type']) === 'video') { const video = status.getIn(['media_attachments', 0]); |