]> source.dussan.org Git - jquery-ui.git/commit
Tests: Account for an extra noop focus/blur listener in jQuery >=3.4
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Sat, 20 Feb 2021 18:11:03 +0000 (19:11 +0100)
committerGitHub <noreply@github.com>
Sat, 20 Feb 2021 18:11:03 +0000 (19:11 +0100)
commit5b5fda7cd24e6265814ddda23b9af2ceef8bcd99
tree5c5a07e0313d4ec14a59f3acda3166f53c018c6b
parent19c628675dadc714616af975969694267f3840df
Tests: Account for an extra noop focus/blur listener in jQuery >=3.4

jQuery >=3.4.0 uses a special focus/blur handler pair needed to fix various
issues with checkboxes/radio buttons as well as being able to pass data in focus
triggers. This leaves extra focus & blur events if any of these events were ever
listened to at a particular element.

We've started skipping these handlers in the `domEqual` assertion in gh-1930 but
we missed a case where an event is triggered before any handler is attached -
jQuery >=3.4.0 attaches then an extra noop listener just to force the code path
to go through the setup code before the trigger happens. We now skip this extra
handler as well.

This fixes a test failure in "dialog: methods" destroy tests.

Closes gh-1945
Ref jquery/jquery#4496
Ref gh-1930
tests/lib/qunit-assert-domequal.js