mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-04 08:38:34 +00:00
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>) => {
|
||||
if (!this.config.interactable) return;
|
||||
if (event?.event?.button === 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.std.getOptional(RefNodeSlotsProvider)?.docLinkClicked.next({
|
||||
...this.referenceInfo,
|
||||
|
||||
Reference in New Issue
Block a user