Skip to main content

Bug Tracker

Side navigation

#5652 closed bug (fixed)

Opened December 12, 2009 09:12PM UTC

Closed December 22, 2009 05:07PM UTC

Last modified December 22, 2009 05:07PM UTC

focus(), blur(), and submit() no longer working in 1.4

Reported by: ixpleo Owned by:
Priority: critical Milestone: 1.4
Component: event Version: 1.4a2
Keywords: Cc:
Blocked by: Blocking:

When testing 1.4a1 in a live application (dev version is running 1.3.2), focus(), blur(), and submit() no longer work.

I created a barebones, test html file to verify. There is a form with a hidden input in the body, and these were the tests:

using document.getElementById().[focus|blur|submit]() works just fine, but not $("#inputIDHere").[focus|blur|submit]()

I haven't tested other events to verify whether or not they are working - just blur(), focus(), and submit()

Attachments (2)
  • native.patch (0.5 KB) - added by adamlogic December 18, 2009 09:49PM UTC.

    This patch fixes the issue for me, but I don't know what side effects might be. I have not run the test suite against this patch.

  • ticket5652.html (2.3 KB) - added by ixpleo December 13, 2009 09:22PM UTC.

    Test File Showing focus(), blur(), and submit() bug

Change History (8)

Changed December 12, 2009 10:42PM UTC by dmethvin comment:1

resolution: → invalid
status: newclosed

Please reopen and attach or link to your test file. Thanks!

Changed December 13, 2009 09:25PM UTC by ixpleo comment:2

resolution: invalid
status: closedreopened

Reopened and attached test file showing jQuery bug for focus(), blur(), and submit()

Also found a blog post online using 1.4a1 that documents the same problem with blur in 1.4a1:

Here is the relevant portion of his post:

Reset and focus the first input element.

NOTE: There appears to be a bug here where

jQuery cannot use its own FOCUS method. I

had to get the raw NODE to do that.

newForm.find( ":text" )

.val( "" )

.get( 0 ).focus()


Changed December 15, 2009 03:28AM UTC by dmethvin comment:3

From the test case, it looks like this still works for IE but not Firefox, Opera, or Safari.

Changed December 18, 2009 09:51PM UTC by adamlogic comment:4

Attached a potential fix.

Changed December 19, 2009 12:45PM UTC by adamlogic comment:5

Ignore my fix. This appears to be working in 1.4a2.

Changed December 19, 2009 10:31PM UTC by ixpleo comment:6

I've tested the attached test case with 1.4a2 and can confirm this bug has been fixed (as adamlogic mentioned).

Changed December 22, 2009 05:07PM UTC by john comment:7

resolution: → fixed
status: reopenedclosed
version: 1.4a11.4a2

Changed December 22, 2009 05:07PM UTC by john comment:8

component: unfilledevent