Bug Tracker

Ticket #13393 (closed bug: fixed)

Opened 22 months ago

Last modified 20 months ago

.focus() results in 'Unspecified error.' IE9, v1.9

Reported by: Firsh Owned by: timmywil
Priority: blocker Milestone: 1.10
Component: event Version: 1.9.1
Keywords: Cc:
Blocking: Blocked by:

Description

When called on its own (not in a click handler or something like that), it returns this in IE9 (dev console). Tried with jQuery migrate, no joy.

min: LOG: JQMIGRATE: Logging is active SCRIPT16389: Unspecified error. jquery.min.js, line 2 character 7390

dev: LOG: JQMIGRATE: Logging is active SCRIPT16389: Unspecified error. jquery.js, line 3216 character 5

JSfiddle:  http://jsbin.com/aloleq/2/edit Thought it was that I was using SIAF before the html elements are loaded (not sure where jsfiddle puts scripts), but it's not the case.

Interestingly it doesn't occur in the view mode of jsfiddle, only in the edit view (and in my plugin).

Change History

comment:1 Changed 22 months ago by Firsh

It works when called with an 1ms setTimeout:  http://jsbin.com/#/ogahac/1/edit

comment:2 follow-up: ↓ 3 Changed 22 months ago by dmethvin

This is related to #13378, which only repros inside an iframe. Asking about document.activeElement seems to be grounds for the IE9 script death penalty while the page is loading.

Slightly modified test case:  http://jsbin.com/aloleq/8/edit

Workaround, use native DOM .focus():  http://jsbin.com/aloleq/10/edit

comment:3 in reply to: ↑ 2 Changed 22 months ago by Firsh

Replying to dmethvin:

Workaround, use native DOM .focus():  http://jsbin.com/aloleq/10/edit

The [0] workaround is king!

Last edited 22 months ago by Firsh (previous) (diff)

comment:4 Changed 22 months ago by dmethvin

  • Priority changed from undecided to blocker
  • Status changed from new to open
  • Component changed from unfiled to event
  • Milestone changed from None to 1.9.2

comment:5 Changed 20 months ago by timmywil

  • Owner set to timmywil
  • Status changed from open to assigned

comment:6 Changed 20 months ago by timmywil

  • Version changed from git to 1.9.1

comment:7 Changed 20 months ago by dmethvin

  • Milestone changed from 1.9.2 to 1.10

comment:8 Changed 20 months ago by Dave Methvin

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

Fix #13393. Avoid IE9 activeElement of death.

Changeset: 85fc5878b3c6af73f42d61eedf73013e7faae408

Note: See TracTickets for help on using tickets.