From 30632adf9eda6d83a9b4269f23f11ced5e09cd93 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sat, 29 Aug 2020 17:48:01 +0200 Subject: Fix replying to some remote toots switching to local-only --- app/javascript/flavours/glitch/reducers/compose.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/javascript/flavours/glitch') diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js index daf857541..478883f91 100644 --- a/app/javascript/flavours/glitch/reducers/compose.js +++ b/app/javascript/flavours/glitch/reducers/compose.js @@ -184,7 +184,7 @@ function continueThread (state, status) { map.set('in_reply_to', status.id); map.update( 'advanced_options', - map => map.merge(new ImmutableMap({ do_not_federate: /👁\ufe0f?\u200b?(?:<\/p>)?$/.test(status.content) })) + map => map.merge(new ImmutableMap({ do_not_federate: status.get('local_only') })) ); map.set('privacy', status.visibility); map.set('sensitive', false); @@ -383,7 +383,7 @@ export default function compose(state = initialState, action) { map.set('privacy', privacyPreference(action.status.get('visibility'), state.get('default_privacy'))); map.update( 'advanced_options', - map => map.merge(new ImmutableMap({ do_not_federate: /👁\ufe0f?\u200b?(?:<\/p>)?$/.test(action.status.get('content')) })) + map => map.merge(new ImmutableMap({ do_not_federate: action.status.get('local_only') })) ); map.set('focusDate', new Date()); map.set('caretPosition', null); -- cgit From 45d1f34a3074782fb68d322cb90dc21b46744426 Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 21 Aug 2020 14:14:28 +0200 Subject: [Glitch] Fix scrolling issues when closing some dropdown menus Port c7cfd4e67aedb38cba3ee452e18bd086e30e2e5d to glitch-soc Signed-off-by: Thibaut Girka --- app/javascript/flavours/glitch/components/dropdown_menu.js | 2 +- .../flavours/glitch/features/compose/components/dropdown.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'app/javascript/flavours/glitch') diff --git a/app/javascript/flavours/glitch/components/dropdown_menu.js b/app/javascript/flavours/glitch/components/dropdown_menu.js index 60ed859a3..e627ea51f 100644 --- a/app/javascript/flavours/glitch/components/dropdown_menu.js +++ b/app/javascript/flavours/glitch/components/dropdown_menu.js @@ -205,7 +205,7 @@ export default class Dropdown extends React.PureComponent { handleClose = () => { if (this.activeElement) { - this.activeElement.focus(); + this.activeElement.focus({ preventScroll: true }); this.activeElement = null; } this.props.onClose(this.state.id); diff --git a/app/javascript/flavours/glitch/features/compose/components/dropdown.js b/app/javascript/flavours/glitch/features/compose/components/dropdown.js index 60035b705..04ef3964b 100644 --- a/app/javascript/flavours/glitch/features/compose/components/dropdown.js +++ b/app/javascript/flavours/glitch/features/compose/components/dropdown.js @@ -57,7 +57,7 @@ export default class ComposerOptionsDropdown extends React.PureComponent { } else { const { top } = target.getBoundingClientRect(); if (this.state.open && this.activeElement) { - this.activeElement.focus(); + this.activeElement.focus({ preventScroll: true }); } this.setState({ placement: top * 2 < innerHeight ? 'bottom' : 'top' }); this.setState({ open: !this.state.open, openedViaKeyboard: type !== 'click' }); @@ -100,7 +100,7 @@ export default class ComposerOptionsDropdown extends React.PureComponent { handleClose = () => { if (this.state.open && this.activeElement) { - this.activeElement.focus(); + this.activeElement.focus({ preventScroll: true }); } this.setState({ open: false }); } -- cgit From cd806663af102d0331ad9be1b53f99c43cf75bf6 Mon Sep 17 00:00:00 2001 From: Takeshi Umeda Date: Sun, 23 Aug 2020 07:08:12 +0900 Subject: [Glitch] Fix click range discrepancies in gifv Port debf6ae31609dcc2fda224b4a6014848cb0e5a27 to glitch-soc Signed-off-by: Thibaut Girka --- app/javascript/flavours/glitch/components/gifv.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'app/javascript/flavours/glitch') diff --git a/app/javascript/flavours/glitch/components/gifv.js b/app/javascript/flavours/glitch/components/gifv.js index 83cfae49c..b775e5200 100644 --- a/app/javascript/flavours/glitch/components/gifv.js +++ b/app/javascript/flavours/glitch/components/gifv.js @@ -54,8 +54,6 @@ export default class GIFV extends React.PureComponent {