mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
fix(editor): middle click open new tab (#12902)
Close [BS-3251](https://linear.app/affine-design/issue/BS-3251/正文的inline链接,chrome中,中键开新窗口的行为丢失了) #### PR Dependency Tree * **PR #12902** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Middle-clicking on links and references now opens them in a new browser tab. - Linux platform detection has been added for improved environment-specific behavior. - **Bug Fixes** - Middle-click paste prevention is now limited to Linux environments when the relevant setting is disabled and excludes clicks on links and references. - **Tests** - Added end-to-end tests to verify that middle-clicking links opens them in a new tab for external links, internal links, and reference documents. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
2
blocksuite/framework/global/src/env/index.ts
vendored
2
blocksuite/framework/global/src/env/index.ts
vendored
@@ -26,4 +26,6 @@ export const IS_IPAD =
|
||||
|
||||
export const IS_WINDOWS = /Win/.test(platform) || /win32/.test(platform);
|
||||
|
||||
export const IS_LINUX = /Linux/.test(platform);
|
||||
|
||||
export const IS_MOBILE = IS_IOS || IS_IPAD || IS_ANDROID;
|
||||
|
||||
Reference in New Issue
Block a user