Bug Tracker

Ticket #1440 (closed bug: fixed)

Opened 1 year ago

Last modified 1 year ago

.focus() doesn't fire for 'a' (anchor) element

Reported by: rworth Assigned to: john
Type: bug Priority: major
Milestone: 1.1.4 Component: event
Version: 1.1.3 Keywords: focus event anchor
Cc: Needs: Review

Description

This is a regression from 1.1.2 to 1.1.3.x:

<a id="myLink">This should be focused.</a>

<script type="text/javascript">

$(function() {

$("#myLink").focus();

});

</script>

Expected: The link receives focus, visible by an outline

Actual: The link does not receive the focus

Cause: I've traced this to the trigger: function jQuery\event\event.js (r1765, line 132)

-if ( fn && val !== false )

+if ( fn && val !== false && !jQuery.nodeName(element, 'a') )

Attachments

Change History

Changed 1 year ago by john

  • owner set to john

Changed 1 year ago by john

  • status changed from new to closed
  • resolution set to fixed

Fixed in SVN rev [2529].

Note: See TracTickets for help on using tickets.