Has anyone ever experienced a similar thing? When I click on the middle area of an li
element, the click event fires, but when clicking on the padded area towards its edge the event doesn't fire.
I'm binding to click
on the element.
Super stumped.
I also saw this happening, but only on iOS. Wrapping with a div didn't work either. After some research I discovered that the YUI delegate listener was not firing on that node's padding (though it did everywhere else on the node). Ultimately, I fixed it by removing that node from the delegate listener entirely and adding a traditional click event listener for just that node. After that, it worked fine!
Not sure if this will help your situation or not.
This is no solution, just a workaround, but wrap the whole content of an li
in a wrapper div
. Apply your padding to the div and not the li. This solved my issue, but this still seems like a very weird bug to me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With