mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Polish "Click to insert $id" tooltip
Summary: The tooltip also broke recently on Firefox after upgrading Ace. This includes a fix for the regression. Test Plan: Updated test. Reviewers: jarek Reviewed By: jarek Subscribers: jarek, dsagal Differential Revision: https://phab.getgrist.com/D3982
This commit is contained in:
@@ -421,15 +421,13 @@ export class FormulaEditor extends NewBaseEditor {
|
||||
|
||||
const colId = col.origCol.peek().colId.peek();
|
||||
|
||||
const aceObj = this._aceEditor.getEditor();
|
||||
|
||||
// Rect only to columns in the same table.
|
||||
if (col.tableId.peek() !== this.options.column.table.peek().tableId.peek()) {
|
||||
// aceObj.focus();
|
||||
// Fall back to default behavior if cursor didn't move to a column in the same table.
|
||||
this.options.gristDoc.onSetCursorPos(row, col).catch(reportError);
|
||||
return;
|
||||
}
|
||||
|
||||
const aceObj = this._aceEditor.getEditor();
|
||||
if (!aceObj.selection.isEmpty()) {
|
||||
// If text selected, replace whole selection
|
||||
aceObj.session.replace(aceObj.selection.getRange(), '$' + colId);
|
||||
|
||||
Reference in New Issue
Block a user