Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anchor Tags Can Lead to Page Reload #101

Closed
philippfromme opened this issue Jun 21, 2021 · 3 comments
Closed

Anchor Tags Can Lead to Page Reload #101

philippfromme opened this issue Jun 21, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@philippfromme
Copy link
Contributor

Describe the Bug

Anchor tags with an empty or relative href lead to a page reload.

WXWAQ5Wf4h

Steps to Reproduce

  1. Add <a href>Click</a> or <a href="foo">Click</a> to a text form field
  2. Click link in form
  3. Page reloads

Expected Behavior

Page doesn't reload. One way to avoid this issue would be adding target="_blank" to all anchor tags by default.

Environment

  • Library version: 0.2.0
@philippfromme philippfromme added bug Something isn't working ready Ready to be worked on labels Jun 21, 2021
@nikku
Copy link
Member

nikku commented Jun 25, 2021

Proposal enforce links opening as target="_blank" rel="noopener" for all but local anchors (#xyz).

@andreasgeier
Copy link
Contributor

andreasgeier commented Jun 28, 2021

I agree that we should open links externally: in a viewer scenario a new browser tab would be opened. In the Modeler editor we would call the standard browser of the system to open the link.

In the viewer, anchor links should not show that behavior but jump to the reference within a page. Editor scenario tbd

@philippfromme
Copy link
Contributor Author

This issue is fixed in v0.24.0 of form-js. Therefore, I'll close this issue. A follow-up issue regarding the potential enhancement can be found here: #116.

@andreasgeier Links within the document work as expected.

NJ6hq8jt0m

@bpmn-io-tasks bpmn-io-tasks bot removed the ready Ready to be worked on label Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants