Skip to content

Bugfix for #3610 #3612

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

Merged
merged 3 commits into from
Aug 25, 2017
Merged

Bugfix for #3610 #3612

merged 3 commits into from
Aug 25, 2017

Conversation

malladi-s
Copy link

Fixes #3610

If deeplinking is disabled, removed the href attribute from the anchor tag fix because empty href points to the base location of the website which causes problems in any SPA.

A side effect is that when an anchor tag has no href it is no longer a hyperlink hence browsers do not show the hand pointer when we hover over it, so setting the pointer to default explicitly.

Surya added 2 commits August 25, 2017 23:43
…result the mouse pointer is not a pointer as it is no longer a hyperlink, setting the cursor explicitly to pointer.
@shockey
Copy link
Contributor

shockey commented Aug 25, 2017

Thanks for this, @invictusmaneo!

I made a small change: I moved the isDeepLinkingEnabled ternary operators into the href and onClick attributes, instead of having two <a> elements in the code.

Turns out that passing null as an attribute's value in React ends up in the attribute not being set in the DOM, so this should be functionally equivalent, without having to repeat the element twice in the code 😄

@shockey shockey merged commit f5df9ff into swagger-api:master Aug 25, 2017
@shockey
Copy link
Contributor

shockey commented Aug 25, 2017

Merged! 🎉

This code will go live tonight, as part of our weekly release.

Thanks for the bug report and PR, @invictusmaneo!

@malladi-s
Copy link
Author

Nice! Thanks @shockey learned something new today 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deep linking causing issues in a SPA.
2 participants