javascript-tutorial / javascript-tutorial/en.javascript.info
Open External Links in a New Tab
还没有人认领这个 Issue。
- 主要语言
- HTML
- 星标
- 25.5k
- 派生
- 4k
- PR 合并指标
- 30 天内没有已合并 PR
描述
Currently, when users click on external links within the application, they open in the same browser tab. This causes users to navigate away from the application entirely, which is interrupting workflow and negatively impact user experience.
**Expected Behavior**
External links should open in a new browser tab (e.g., using target="_blank" with appropriate security attributes like rel="noopener noreferrer"). This allows users to:
- Keep the application open in the original tab.
- Easily return to their previous context.
- Avoid losing unsaved progress or navigation state.
**Current Behavior**
All links (including external links) open in the same tab, replacing the current application view.
**Proposed Solution**
Update external anchor elements to open in a new tab by default.
**Additional Context**
Opening external links in a new tab is a common UX pattern in web applications, especially when linking to documentation or external references.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先定位应用程序中的外部锚元素,并将其与保留在站点内的链接进行比较。在浏览器中验证外部链接会在单独的标签页中打开,而内部链接保留其现有行为,并确认在新标签页中打开的链接包含所请求的安全属性。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- html
- 领域
- frontend, web-dev
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 55/100