[Glitch] Fix timeline markers not working on Chrome

Port 5aff2a6957 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
ThibG
2020-05-29 16:14:16 +02:00
committed by Thibaut Girka
parent 60b43050cb
commit 9bd30b8dd5
6 changed files with 112 additions and 24 deletions

View File

@ -12,7 +12,7 @@ import { expandHomeTimeline } from 'flavours/glitch/actions/timelines';
import { expandNotifications, notificationsSetVisibility } from 'flavours/glitch/actions/notifications';
import { fetchFilters } from 'flavours/glitch/actions/filters';
import { clearHeight } from 'flavours/glitch/actions/height_cache';
import { submitMarkers, fetchMarkers } from 'flavours/glitch/actions/markers';
import { synchronouslySubmitMarkers, fetchMarkers } from 'flavours/glitch/actions/markers';
import { WrappedSwitch, WrappedRoute } from 'flavours/glitch/util/react_router_helpers';
import UploadArea from './components/upload_area';
import PermaLink from 'flavours/glitch/components/permalink';
@ -267,7 +267,7 @@ class UI extends React.Component {
handleBeforeUnload = (e) => {
const { intl, dispatch, hasComposingText, hasMediaAttachments } = this.props;
dispatch(submitMarkers());
dispatch(synchronouslySubmitMarkers());
if (hasComposingText || hasMediaAttachments) {
// Setting returnValue to any string causes confirmation dialog.