Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JQMIGRATE: jQuery.fn.focus() event shorthand is deprecated #34

Open
siliconforks opened this issue Nov 18, 2023 · 0 comments
Open

JQMIGRATE: jQuery.fn.focus() event shorthand is deprecated #34

siliconforks opened this issue Nov 18, 2023 · 0 comments

Comments

@siliconforks
Copy link

If you define SCRIPT_DEBUG as TRUE and then click the search icon, the following warning gets displayed in the browser console:

JQMIGRATE: jQuery.fn.focus() event shorthand is deprecated

This is coming from assets/js/full-screen-search.js

There are a couple of ways this could be fixed:

  1. The simplest thing to do would be to just follow the advice at https://api.jquery.com/focus-shorthand/ and make this change:

    Instead of .focus(), use .trigger( "focus" ).

  2. Another possibility would be to use the native focus() method instead. In fact, it might be worthwhile to consider removing jQuery entirely, since that would improve performance. (Actually, in practice it would probably not improve performance much, but it would improve HoverCraft's Google PageSpeed score, and for most people that is all that matters in life.)

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

No branches or pull requests

1 participant