(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:
Cyprien P
2022-02-16 15:15:27 +01:00
parent f224afcc62
commit afa90cc365
6 changed files with 31 additions and 5 deletions

View File

@@ -20,6 +20,7 @@ import {dom as grains} from 'grainjs';
import * as ko from 'knockout';
import defaults = require('lodash/defaults');
import {AccessLevel} from 'app/common/CustomWidget';
import {closeRegisteredMenu} from 'app/client/ui2018/menus';
/**
* CustomView components displays arbitrary html. There are two modes available, in the "url" mode
@@ -218,6 +219,8 @@ export class CustomView extends Disposable {
if (!this.viewSection.isDisposed() && !this.viewSection.hasFocus()) {
this.viewSection.hasFocus(true);
}
// allow menus to close if any
closeRegisteredMenu();
})
});