jQuery: The Write Less, Do More JavaScript Library

Ticket #2662 (new bug)

Opened 4 months ago

Last modified 2 weeks ago

attr "action" of form and Selectors' attribute filter

Reported by: vytautas Assigned to: flesler
Type: bug Priority: major
Milestone: 1.3 Component: selector
Version: 1.2.3 Keywords:
Cc: Needs: Patch

Description

html:

<form action="account/edit">....</form>

javascript:

$('form[action="account/edit"]').size();
$('form[action="account/edit"]').attr('action');
$('form[action="http://example.org/account/edit"]').size();
$('form[action="http://example.org/account/edit"]').attr('action');

results:

firefox-1.5.0.1, firefox-2.0.0.13, firefox-3b5: 0, "undefined", 1, "account/edit"
mozilla-1.7.7, opera-9.50b, ie-6, ie-7, safari-3.1.525.13: 1, "account/edit", 0, "undefined"
opera-8.0, opera-9.00, opera-9.26: 0, "undefined", 1, "http://example.org/account/edit"

conclusions:

- the firefoxes differ
- jquery should hide these browser incompatibilities and always result in: 1, "account/edit", 0, "undefined"

Attachments

action.2.html (1.1 kB) - added by vytautas 2 months ago.
action.html (1.1 kB) - added by vytautas 2 months ago.

Change History

Changed 3 months ago by flesler

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

This needs to be retested, but I think this is fixed now at [5574].

Please reopen if necessary.

Changed 2 months ago by vytautas

  • status changed from closed to reopened
  • resolution deleted

Reopening, because nothing changed.

Here are test results using jquery-1.2.6:

firefox-1.5.0.1, firefox-2.0.0.14, firefox-3_rc1: 0, "undefined", 1, "account/edit" mozilla-1.7.7, opera-9.50b, ie-6, ie-7, safari-3.1.1_525.17.0: 1, "account/edit", 0, "undefined" opera-8.0, opera-9.00, opera-9.27: 0, "undefined", 1, "http://example.org/account/edit"

While all browsers should return: 1, "account/edit", 0, "undefined"

Changed 2 months ago by vytautas

Changed 2 months ago by vytautas

Changed 2 months ago by flesler

  • owner set to flesler
  • status changed from reopened to new

Changed 2 weeks ago by flesler

  • component changed from core to selector
  • milestone changed from 1.2.4 to 1.3

#3194 fixes this, but adds a lot of overhead... This will require hard work with the benchmarker.

Note: See TracTickets for help on using tickets.