Bug Tracker

Modify

Ticket #5652 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

Description

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

ticket5652.html Download (2.3 KB) - added by ixpleo 3 years ago.
Test File Showing focus(), blur(), and submit() bug
native.patch Download (541 bytes) - added by adamlogic 3 years ago.
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.

Change History

comment:1 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

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

Changed 3 years ago by ixpleo

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

comment:2 Changed 3 years ago by ixpleo

  • Status changed from closed to reopened
  • Resolution invalid deleted

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:

 http://www.bennadel.com/index.cfm?dax=blog:1772.view

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()

;

comment:3 Changed 3 years ago by dmethvin

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

Changed 3 years ago by adamlogic

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.

comment:4 Changed 3 years ago by adamlogic

Attached a potential fix.

comment:5 Changed 3 years ago by adamlogic

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

comment:6 Changed 3 years ago by ixpleo

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

comment:7 Changed 3 years ago by john

  • Status changed from reopened to closed
  • Version changed from 1.4a1 to 1.4a2
  • Resolution set to fixed

comment:8 Changed 3 years ago by john

  • Component changed from unfilled to event

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.