mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Show default context menu on link
Summary: also: - closes opened menu if any when click on a custom widget - closes opened menu if any when F2 Test Plan: Include test case Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3269
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
* `dom.on('contextmenu', ev => ev.preventDefault())`
|
||||
*/
|
||||
import { Disposable, dom, DomArg, DomContents, Holder } from "grainjs";
|
||||
import { cssMenuElem } from 'app/client/ui2018/menus';
|
||||
import { cssMenuElem, registerMenuOpen } from 'app/client/ui2018/menus';
|
||||
import { IOpenController, Menu } from 'popweasel';
|
||||
|
||||
export type IContextMenuContentFunc = (ctx: ContextMenuController) => DomContents;
|
||||
@@ -50,6 +50,8 @@ class ContextMenuController extends Disposable implements IOpenController {
|
||||
dom.domDispose(content);
|
||||
content.remove();
|
||||
});
|
||||
|
||||
registerMenuOpen(this);
|
||||
}
|
||||
|
||||
public close() {
|
||||
|
||||
Reference in New Issue
Block a user