mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-05 06:09:20 +00:00
Set dropup
on file tree context menu when needed (#19521)
GitOrigin-RevId: 7817b95c1896fe6ed3fcb37045821fb31b7b4b1f
This commit is contained in:
parent
7e136131c0
commit
2f80e74d8a
1 changed files with 7 additions and 1 deletions
|
@ -31,9 +31,15 @@ function FileTreeContextMenu() {
|
|||
open
|
||||
id="dropdown-file-tree-context-menu"
|
||||
onToggle={handleToggle}
|
||||
dropup={
|
||||
document.body.offsetHeight / contextMenuCoords.top < 2 &&
|
||||
document.body.offsetHeight - contextMenuCoords.top < 250
|
||||
}
|
||||
className="context-menu"
|
||||
style={contextMenuCoords}
|
||||
>
|
||||
<FakeDropDownToggle bsRole="toggle" />
|
||||
<Dropdown.Menu className="context-menu" style={contextMenuCoords}>
|
||||
<Dropdown.Menu>
|
||||
<FileTreeItemMenuItems />
|
||||
</Dropdown.Menu>
|
||||
</Dropdown>,
|
||||
|
|
Loading…
Reference in a new issue