fix(editor): allow right click on reference (#13259)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved click event handling on reference elements to prevent unintended behavior from right-clicks. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -150,6 +150,9 @@ export class AffineReference extends WithDisposable(ShadowlessElement) {
|
|||||||
|
|
||||||
readonly open = (event?: Partial<DocLinkClickedEvent>) => {
|
readonly open = (event?: Partial<DocLinkClickedEvent>) => {
|
||||||
if (!this.config.interactable) return;
|
if (!this.config.interactable) return;
|
||||||
|
if (event?.event?.button === 2) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.std.getOptional(RefNodeSlotsProvider)?.docLinkClicked.next({
|
this.std.getOptional(RefNodeSlotsProvider)?.docLinkClicked.next({
|
||||||
...this.referenceInfo,
|
...this.referenceInfo,
|
||||||
|
|||||||
Reference in New Issue
Block a user