Bug Tracker

Modify

Ticket #8473 (closed bug: fixed)

Opened 3 years ago

Last modified 2 years ago

In IE9rc *[tabIndex] select all elements without tabindex also

Reported by: EMVI Owned by: timmywil
Priority: high Milestone: 1.8
Component: selector Version: 1.5.1
Keywords: Cc:
Blocking: Blocked by:

Description

The live events are triggert for all elements, if I remove the "*[tabIndex]" selector the events are only triggert for a and :input elements.

$('a,:input,*[tabIndex]')
    .live('focus',function(){
        this.isFocused = true;
    })
    .live('blur',function(){
        this.isFocused = false;
    })
    .live('mousedown',function(){
        // in webkit some input doesn't get focus on select by mousedown
        if( !this.isFocused ){
            this.focus();
        }
    });

Change History

comment:1 Changed 3 years ago by addyosmani

  • Priority changed from undecided to low

Thanks for submitting a ticket to the jQuery Bug tracker. Could you please provide us a complete reduced test-case on jsFiddle.net that we can run to evaluate whether this issue is due to jQuery core or a bug in your implementation?

comment:2 Changed 3 years ago by EMVI

Here is the jsFiddle test-case:  http://jsfiddle.net/mnqBT/3/

comment:3 Changed 3 years ago by dmethvin

  • Status changed from new to open
  • Component changed from unfiled to selector

In IE6/7 there's no querySelectorAll and the Sizzle JS engine path is looking at the tabIndex property (which exists on all elements) rather than an explicit attribute.

comment:4 Changed 3 years ago by john

  • Owner set to timmywil
  • Priority changed from low to blocker
  • Status changed from open to assigned
  • Milestone changed from 1.next to 1.7

Confirmed in bug triage.

comment:5 Changed 3 years ago by timmywil

  • Priority changed from blocker to high
  • Milestone changed from 1.7 to 1.8

Moving to 1.8. After hooking up Sizzle to jQuery.attr, everything works as we intended. One of the ways we intend it to work, however, prohibits us from fixing this bug until we can deprecate retrieving the tabIndex property with .attr('tabindex'). We currently copy over the propHook to attrHooks in order to mirror previous behavior. When we do deprecate this, it will fix this selector bug and put attr even closer to what it should be, but we will see users complain about getting undefined instead of a number when we do deprecate the tabindex attrHook. I'd like to officially deprecate it in 1.7 and remove it in 1.8 effectively killing this bug. Any objections?

comment:6 Changed 2 years ago by timmywil

#11568 is a duplicate of this ticket.

comment:7 Changed 2 years ago by timmywil

  • Status changed from assigned to closed
  • Resolution set to fixed

Remove the tabindex attrHook. Fixes #8473

Changeset: 3e2a77c5e882b5fc88bf5469ea00067833a2a059

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.