Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/stores/RightPanelStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {RightPanelPhases, RIGHT_PANEL_PHASES_NO_ARGS} from "./RightPanelStorePha
import {ActionPayload} from "../dispatcher/payloads";
import {Action} from '../dispatcher/actions';
import { SettingLevel } from "../settings/SettingLevel";
import RoomViewStore from './RoomViewStore';

interface RightPanelStoreState {
// Whether or not to show the right panel at all. We split out rooms and groups
Expand Down Expand Up @@ -147,6 +148,8 @@ export default class RightPanelStore extends Store<ActionPayload> {
switch (payload.action) {
case 'view_room':
case 'view_group':
if (payload.room_id === RoomViewStore.getRoomId()) break; // skip this transition, probably a permalink

// Reset to the member list if we're viewing member info
if (MEMBER_INFO_PHASES.includes(this.state.lastRoomPhase)) {
this.setState({lastRoomPhase: RightPanelPhases.RoomMemberList, lastRoomPhaseParams: {}});
Expand Down
6 changes: 5 additions & 1 deletion test/end-to-end-tests/src/usecases/rightpanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ module.exports.goBackToRoomSummaryCard = async function(session) {
// Sometimes our tests have this opened to MemberInfo
await backButton.click();
} catch (e) {
break; // stop trying to go further back
// explicitly check for TimeoutError as this sometimes returned
// `Error: Node is detached from document` due to a re-render race or similar
if (e.name === "TimeoutError") {
break; // stop trying to go further back
}
}
}
};
Expand Down