JQuery 3.2.1 Deprecations

JQuery 3.2.1 Deprecations

SaihSaih Posts: 3Questions: 1Answers: 0
edited January 2018 in Free community support

I have Datatables 1.10.16
It was said that it should not have problem with jquery 3, but it still have with focus() and blur().

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

My jquery version is 3.2.1

Replies

  • SaihSaih Posts: 3Questions: 1Answers: 0

    Both calls to blur and focus should be

    .trigger("blur"), and .trigger("focus")

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    Thanks for posting this. I will commit fixes for this shortly and post back here when done.

    Allan

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    I've just been looking into this. The jQuery API documentation doesn't mention anything about $().focus() being deprecated.

    I've also just created a little example which uses jQuery 3.2.1 and jQuery Migrate 3.0.1: http://live.datatables.net/kufaxeba/1/edit

    It doesn't show any warning messages about using $().focus() can I can see.

    Can you link to a test page showing the issue please?

    Allan

  • iqbalansari02iqbalansari02 Posts: 1Questions: 0Answers: 0

    Hi @allan,

    I get the following warning from jQuery migrate while using Datatables

    jQuery.fn.scroll() event shorthand is deprecated

    However this happens only if I provide the option scrollY option in the initial configuration, you can verify this at http://live.datatables.net/kufaxeba/5/edit

    jQuery migrate seems to warn about all the event shorthands.

    Thanks

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    Thanks! That issue is caused by this part of the code. I'll get that sorted out and post back.

    Allan

  • RawoskiRawoski Posts: 1Questions: 0Answers: 0

    Hi @allan ,

    I've got the same issue. This happens when I press Number and Next buttons of the pagination.

    You can see this here live.datatables.net/kufaxeba/6/edit
    (it doesn't alert in the app console but in the browser console (F12)

    Thanks

  • logiclogic Posts: 1Questions: 0Answers: 0

    Hi @allan

    I get the below two error when using JQMigrate v 3.1.0 with datatables 1.10.19.

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

    JQMIGRATE: jQuery.fn.bind() is deprecated

    Is there any fix for this?

    Thanks!

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    Hi,

    The nightly has these two issues addressed. We need to tag a .20 release which will be done soon. Try it with the nightly and let me know, but that should do it.

    Allan

This discussion has been closed.