for 'Problem with prototype UJS and pictures as links' LH-4663

I've created a patch for this issue

As explained in the comments, this issue doesn't occur with
rails/prototype-ujs as this requires prototype 1.7 rc2 and this
version handles event delegation better than prototype 1.6.

So I've only change the rails.js file in the rails master branch.

Hope I could help.