fix(editor): support reactive readonly for table block (#11248)
fix: BS-2957
This commit is contained in:
@@ -29,9 +29,6 @@ export class SelectionController implements ReactiveController {
|
|||||||
this.host.addController(this);
|
this.host.addController(this);
|
||||||
}
|
}
|
||||||
hostConnected() {
|
hostConnected() {
|
||||||
if (this.dataManager.readonly$.value) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.dragListener();
|
this.dragListener();
|
||||||
this.host.handleEvent('copy', this.onCopy);
|
this.host.handleEvent('copy', this.onCopy);
|
||||||
this.host.handleEvent('cut', this.onCut);
|
this.host.handleEvent('cut', this.onCut);
|
||||||
@@ -84,7 +81,7 @@ export class SelectionController implements ReactiveController {
|
|||||||
window.addEventListener('mouseup', onUp);
|
window.addEventListener('mouseup', onUp);
|
||||||
}
|
}
|
||||||
dragListener() {
|
dragListener() {
|
||||||
if (IS_MOBILE) {
|
if (IS_MOBILE || this.dataManager.readonly$.value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.host.disposables.addFromEvent(this.host, 'mousedown', event => {
|
this.host.disposables.addFromEvent(this.host, 'mousedown', event => {
|
||||||
|
|||||||
Reference in New Issue
Block a user