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:
EYHN
2025-08-07 12:55:37 +08:00
committed by GitHub
parent 747b11b128
commit c54ccda881

View File

@@ -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,