[ticket/11516] Upgrading the .live jquery function because it is deprecated.

I changed the .live function of jQuery for .on function because a user
reported that he had an error because of that, it showed that .live function
was deprecated, so I changed for .on that it's same but it work with new
jQuery versions.

PHPBB3-11516
This commit is contained in:
Jesús Rafael Cova Huerta 2013-05-04 19:27:55 -04:30 committed by Joas Schilling
parent 8870d0701f
commit 7f82a95cb0

View file

@ -364,7 +364,7 @@ function submit_default_button(event, selector, class_name) {
* The non-jQuery code is a mimick of the jQuery code ;) * The non-jQuery code is a mimick of the jQuery code ;)
*/ */
function apply_onkeypress_event() { function apply_onkeypress_event() {
jQuery('form input[type=text], form input[type=password]').live('keypress', function (e) { jQuery('form input[type=text], form input[type=password]').on('keypress', function (e) {
var default_button = jQuery(this).parents('form').find('input[type=submit].default-submit-action'); var default_button = jQuery(this).parents('form').find('input[type=submit].default-submit-action');
if (!default_button || default_button.length <= 0) { if (!default_button || default_button.length <= 0) {