Skip to content

Check type of tag before preventing default - #1

Open
elHornair wants to merge 3 commits into
pazguille:masterfrom
elHornair:master
Open

Check type of tag before preventing default#1
elHornair wants to merge 3 commits into
pazguille:masterfrom
elHornair:master

Conversation

@elHornair

Copy link
Copy Markdown

I think the default behaviour of the browser should only be prevented if the clicked element is an anchor. In my case, I was having trouble with Checkboxes that wouldn't get checked anymore because I was using Clicktap on them to trigger some additional JS.

@elHornair

Copy link
Copy Markdown
Author

Update: Changed PR so the default behaviour is never prevented at all. I think the event handlers themselves should take care of preventing the default behaviour if needed, because sometimes you want to do something custom but still let the browser take care of the click. Or you want the event to continue bubbling.

@elHornair

Copy link
Copy Markdown
Author

@pazguille Just saw that the build is failing. I can try to fix it, but maybe you could first comment on the PR? Because there is no need for me to fix the tests if you don't agree with the PR and it won't be merged anyway ;)

@pazguille

Copy link
Copy Markdown
Owner

Sorry for the delay :(

Yes, you can fix that.

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.

2 participants