(core) Restore default context menu out of std views

Summary:
Also fix few clode glitches
- Attach events handler to the scrollPane using `onMatch` instead of
  the cell itself. This streamline cell dom creation a bit while
  scrolling.
- Fix memory leaks on contextMenu.
- Also fix Importer and ColumnOps nbrowser test

see:
https://phab.getgrist.com/D3237#inline-36376
https://phab.getgrist.com/D3237#inline-36375

Restore default context menu for where there's no custom one

It appears that default context menu adds some value, in particular
for links and for editing text. This diff restores it.

Test Plan: Should not break anything.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D3256
This commit is contained in:
Cyprien P
2022-02-08 10:26:29 +01:00
parent e99122433a
commit 7cc3092e1b
3 changed files with 22 additions and 28 deletions

View File

@@ -30,10 +30,7 @@ export function createAppUI(topAppModel: TopAppModel, appObj: App): IDisposable
dom.update(document.body, content, {
// Cancel out bootstrap's overrides.
style: 'font-family: inherit; font-size: inherit; line-height: inherit;'
},
// prevent default context menu to show
dom.on('contextmenu', (ev) => ev.preventDefault())
);
});
function dispose() {
// Return value of dom.maybe() / dom.domComputed() is a pair of markers with a function that