Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails app refreshing on localhost - event.returnValue is deprecated warning

My Rails app on localhost started randomly refreshing when using the 'back' browser arrow. Chrome(31.0.1650.48) console reads:

event.returnValue is deprecated. Please use the standard event.preventDefault() instead. 

I guess these issues are connected.

I also found this recent issue on jQuery bugtracker. Funny thing, but 10 hours ago everything was fine.

Anyone experiencing similar problems? What are the options?

EDIT: although I was browsing my app on localhost, I found out that a number of production websites are experiencing the same problem, showing the same console output, including 37signals

like image 689
The Whiz of Oz Avatar asked Nov 14 '13 06:11

The Whiz of Oz


2 Answers

I believe this is largely due to the newest version of Chrome that you are using. I haven't found the exact details but it appears that Chrome has decided to deprecate this property which is currently used by jQuery.

Since it's just a deprecation, nothing will be broken yet, but it does mean that it will be removed in the future. Once jQuery fixes the issue you should probably try to update.

Edit: Sorry I missed the point - I would assume that the random refreshing is unrelated to the message you are seeing about event.returnValue

like image 108
iterion Avatar answered Oct 20 '22 00:10

iterion


Check this link out Looks like the native js method 'event.returnValue' has been marked as deprecated in newer Chrome versions. http://bugs.jquery.com/ticket/14320

like image 1
mohamed-ibrahim Avatar answered Oct 20 '22 00:10

mohamed-ibrahim