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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃摌] onClick event will not fire if clickNavigate is set to true #228

Closed
reydelleon opened this issue Apr 26, 2015 · 1 comment 路 Fixed by #419
Closed

[馃摌] onClick event will not fire if clickNavigate is set to true #228

reydelleon opened this issue Apr 26, 2015 · 1 comment 路 Fixed by #419

Comments

@reydelleon
Copy link

First of all, thanks for such an awesome and very complete plugin. It saved me a lot of work!

Recently, I spent some time trying to find out why the onClick was not firing. It turns out that this will happen whenever clickNavigate is set to true. I don't know if this is a desired behavior or not. If it is, then I would suggest a brief note be included in the docs to point this out. If it's not, then I hope this issue serves to bring it up so it be fixed.

@techfg
Copy link
Collaborator

techfg commented Jan 30, 2021

Hello @reydelleon -

Thank you for your feedback, apologies for the delayed reply!

This is expected behavior in the current version as the intent of clickNavigate === true would be to navigate to a URL in which case, the page itself is changing so there typically wouldn't be a need to further execute onClick function.

With that said and as of v1.5.0, IM now has a navigateMode parameter which changes the previous behavior of always navigating in the current window and allowing navigation to occur in other targets (e.g. _blank, iframe, etc.). GIven this, there could be scenarios where it would be beneficial to still invoke onClick even when clickNavigate is true.

Marking this as a new feature and also noting that regardless of decision, the docs should be updated to reflect the expected bevhior.

Thank you again!

@techfg techfg changed the title onClick event will not fire if clickNavigate is set to true [馃摌] onClick event will not fire if clickNavigate is set to true Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants