mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Skip saving layout resizes in read-only mode
Summary: This change causes a notification about missing write access to no longer be shown when resizing layouts as a viewer. Test Plan: Browser test. Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D3167
This commit is contained in:
parent
ef1fc916e6
commit
7f08934cf0
@ -106,7 +106,11 @@ export class ViewLayout extends DisposableWithEvents implements IDomComponent {
|
||||
this._isResizing.set(false);
|
||||
layoutSaveDelay.schedule(1000, () => {
|
||||
if (!this._layout) { return; }
|
||||
|
||||
// Only save layout changes when the document isn't read-only.
|
||||
if (!this.gristDoc.isReadonly.get()) {
|
||||
(this.viewModel.layoutSpecObj as any).setAndSave(this._layout.getLayoutSpec());
|
||||
}
|
||||
this._onResize();
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user