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

[BUGFIX] click event on links in notification message #270

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Shajansheriff
Copy link
Contributor

Fix 269



# IDE / Code Editor configs
/.idea
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this added on purpose? Usually environment specific things like developers' IDEs make more sense in a global .gitignore

@jacobq
Copy link
Contributor

jacobq commented May 12, 2020

Closes #274

@LuisAverhoff
Copy link

LuisAverhoff commented Mar 7, 2021

@Shajansheriff I think a better solution to this would be to move the close button outside of the div that has the onClick handler and absolutely position it to the top right inside the outer container. That way we don't need to stop propagation. Of course the outer container should have position: relative. What do you think?

@bjornharrtell
Copy link

@LuisAverhoff no that workaround is not applicable. This fix and the issue is about having links in notification content that become unclickable.

@LuisAverhoff
Copy link

LuisAverhoff commented Mar 8, 2021

@bjornharrtell

The fix proposed by @Shajansheriff involves calling event.stopPropagation and that is only because he is using the on modifier which ignores parameters like bubbles=false, preventDefault=false etc unlike the action modifier(If I recall correctly, it automatically prevents the default action). The alternative fix that I propose makes calling event.stopPropagation unnecessary because the event will no longer bubble to the onClick handler and prevent the default action from being called when clicked. The problem really boils down to circumventing the bubbling phase that occurs in events and there are multiple ways we can go about it. The one that I proposed is one of them.

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.

links in notifications doesn't redirect to links' target
4 participants