jquery: Bug of find element with empty attribute in v3.4

Description

Hi. After updating jQuery to 3.4, I encountered strange behavior on Edge and IE11.

Finding elements with empty attributes was successful in v3.3. But, v3.4 and later will fail on Edge and IE11.

<div id="test">
    <input name="">
</div>
var $input = $("#test").find("[name='']");

console.log($input.length); // This will return 0, only on Edge and IE11 after updating to v3.4

Link to test case

https://jsbin.com/jitatiduqi/1/edit?html,css,js,output

If this is a bug, I’m glad if a fix is ​​considered. Thanks.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (13 by maintainers)

Commits related to this issue

Most upvoted comments

Sizzle update merged in #4641. The issue is now fixed both on master & on 3.x-stable.

~~Sizzle PR: https://github.com/jquery/sizzle/pull/450~~

EDIT: This wasn’t a PR for this issue.