mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 02:05:45 +03:00
Merge pull request #6318 from SimonBrandner/fix/image-view-context-menu/17892
This commit is contained in:
commit
2397d0ec8b
1 changed files with 6 additions and 10 deletions
|
@ -24,7 +24,7 @@ import FocusLock from "react-focus-lock";
|
||||||
import MemberAvatar from "../avatars/MemberAvatar";
|
import MemberAvatar from "../avatars/MemberAvatar";
|
||||||
import { ContextMenuTooltipButton } from "../../../accessibility/context_menu/ContextMenuTooltipButton";
|
import { ContextMenuTooltipButton } from "../../../accessibility/context_menu/ContextMenuTooltipButton";
|
||||||
import MessageContextMenu from "../context_menus/MessageContextMenu";
|
import MessageContextMenu from "../context_menus/MessageContextMenu";
|
||||||
import { aboveLeftOf, ContextMenu } from '../../structures/ContextMenu';
|
import { aboveLeftOf } from '../../structures/ContextMenu';
|
||||||
import MessageTimestamp from "../messages/MessageTimestamp";
|
import MessageTimestamp from "../messages/MessageTimestamp";
|
||||||
import SettingsStore from "../../../settings/SettingsStore";
|
import SettingsStore from "../../../settings/SettingsStore";
|
||||||
import { formatFullDate } from "../../../DateUtils";
|
import { formatFullDate } from "../../../DateUtils";
|
||||||
|
@ -304,17 +304,13 @@ export default class ImageView extends React.Component<IProps, IState> {
|
||||||
let contextMenu = null;
|
let contextMenu = null;
|
||||||
if (this.state.contextMenuDisplayed) {
|
if (this.state.contextMenuDisplayed) {
|
||||||
contextMenu = (
|
contextMenu = (
|
||||||
<ContextMenu
|
<MessageContextMenu
|
||||||
{...aboveLeftOf(this.contextMenuButton.current.getBoundingClientRect())}
|
{...aboveLeftOf(this.contextMenuButton.current.getBoundingClientRect())}
|
||||||
|
mxEvent={this.props.mxEvent}
|
||||||
|
permalinkCreator={this.props.permalinkCreator}
|
||||||
onFinished={this.onCloseContextMenu}
|
onFinished={this.onCloseContextMenu}
|
||||||
>
|
onCloseDialog={this.props.onFinished}
|
||||||
<MessageContextMenu
|
/>
|
||||||
mxEvent={this.props.mxEvent}
|
|
||||||
permalinkCreator={this.props.permalinkCreator}
|
|
||||||
onFinished={this.onCloseContextMenu}
|
|
||||||
onCloseDialog={this.props.onFinished}
|
|
||||||
/>
|
|
||||||
</ContextMenu>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue