04-17-2012 04:00 PM
I have a fixed-position "back" button in my app that is not firing when the screen is scrolled down.
Here's the button code:
<button id='buttonBack' style='position:fixed; right:5px'>Back</button><br>
When I scroll the screen back to the top, the button fires without a problem. However, if the screen is scrolled down at all, the button click event does not fire.
I traced events in Web Inspector and an click event does fire when I click on the button. However, it doesn't actually fire the method I have bound to the button's click event. Again, if I scroll the screen back to the top, the button click fires fine.
I should note that the button is displayed correctly at all times. It stays in a fixed position 5px from the right side of the screen, even when the window is scrolled down. So the button is visible at all times. It's just that when I scroll down nothing happens if I click the button.
It seems like a bug with WebWorks. Can anybody confirm?
Solved! Go to Solution.
04-17-2012 04:51 PM
04-18-2012 01:25 PM
Thanks for the suggestion ignites.
I found that this was caused by my own bug. It was a z-index problem. I increased the z-index of the button and it solved the problem. The button must have been conflicting with elements further down the page, but was fine at the top of the page.