Bug Tracker

Modify

Ticket #3245 (closed bug: fixed)

Opened 5 years ago

Last modified 2 years ago

Can not select a form using the action attribute

Reported by: mw44118 Owned by: flesler
Priority: minor Milestone: 1.3
Component: selector Version: 1.2.6
Keywords: selector form action attribute Cc:
Blocking: Blocked by:

Description

I had a form like

<form action="xyz"> </form>

I tried to select it with

$("form[action='xyz']")

and I got back an empty set of nodes.

Attachments

3245.html Download (1.8 KB) - added by nathanhammond 5 years ago.
Correlating Info
special.html Download (6.3 KB) - added by nathanhammond 5 years ago.
Test case for href, action, and src attributes.

Change History

comment:1 Changed 5 years ago by ThrushAAX

however $("form[action*='xyz']") does work...

comment:2 Changed 5 years ago by flesler

  • Owner set to flesler
  • Status changed from new to assigned
  • Component changed from core to selector

This is related to another ticket... but I don't recall the number right now. We'll try to fix this for 1.3 (without hitting on perfomance).

comment:3 Changed 5 years ago by nathanhammon

Related to  2747 I think.

Changed 5 years ago by nathanhammond

Correlating Info

comment:4 Changed 5 years ago by nathanhammon

This is actually a separate bug from 2747. To make this one consistent everywhere we only have to add 'action' into the list of attributes that are special to force them to be accessed using getAttribute('action'). Accessing Element.action (DOM level 0) pulls back a fully qualified domain in IE8 and FF. Attaching a patch.

comment:5 Changed 5 years ago by nathanhammon

So I was wrong. Something a little funky is going on. I'm attaching a complete test comparison for href, src, and action instead.

Changed 5 years ago by nathanhammond

Test case for href, action, and src attributes.

comment:6 Changed 4 years ago by dmethvin

See also #3113 and #2662.

comment:7 Changed 2 years ago by danheberden

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

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.