Skip to content

Instantly share code, notes, and snippets.

@BhargavBhandari90
Created December 15, 2016 11:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BhargavBhandari90/5bfb7aa12f2a5bdab615c87931ffdff0 to your computer and use it in GitHub Desktop.
Save BhargavBhandari90/5bfb7aa12f2a5bdab615c87931ffdff0 to your computer and use it in GitHub Desktop.
Prevent license key validation by Enter Key as it is deactivates the first plugin's license.
/* Prevent license key validation by Enter Key as it is deactivates the first plugin's license. */
jQuery( '.license-form .regular-text' ).each( function(){
jQuery( this ).keypress(function (event) {
var keycode = (event.keyCode ? event.keyCode : event.which);
/* check if key pressed is "Enter key" or not */
if(keycode == '13'){
return false;
}
} );
} );
@BhargavBhandari90
Copy link
Author

rtMedia/app/assets/admin/js/scripts.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment