Bug Tracker

Modify

Ticket #7690 (closed bug: invalid)

Opened 2 years ago

Last modified 2 years ago

Opera - $("#id") fails when there is element with name="id"

Reported by: jozo.hovan@… Owned by:
Priority: undecided Milestone: 1.6
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocking: Blocked by:

Description

In Opera (at least version 9.23) code fails with error. There is selector by id and it has conflict with hidden input element with same name.

<html>
<body>
	<script src="jquery.js" type="text/javascript"></script>
	
	<script type="text/javascript">
		$(document).ready(function (){
			try{
				$("#hInput");
				alert("ok");
			}catch(e){
				alert("error");
			}
		});
		
	</script>

	<input type="hidden" name="hInput" value="val">
</body>
</html>

Change History

comment:1 Changed 2 years ago by jitter

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

Thanks for taking the time to contribute to the jQuery project by writing a bug report.

After checking your report I made a  live test case with the latest jQuery (1.4.4) and tested with Opera 10.63 and Opera 9.64. I couldn't reproduce what you reported, as both browsers show the "ok" alert.

You didn't mention which jQuery version you used, so there isn't much I can do to further evaluate this issue. Also consider that Opera 9.23 is an old browser (old as in older then 3 years) and isn't even the latest of the 9.x branch.

Considering all this I'm closing this ticket as invalid, feel free to report back if this issue persists for you with the latest version of jQuery.

---

The next time please provide a link to a test case on  http://jsfiddle.net instead of pasting the code in the ticket. Doing that enables us to verify your bug report more quickly.
 How to report bugs

comment:2 Changed 2 years ago by jozo.hovan@…

Thanks for your investigation, affected jQuery version is 1.4.4. I understand that it's unable to resolve unwanted behaviour in all old versions of all supported browsers.

So I guess, it is better to claim that supported is Opera 9.x and 10.x (latest version) not Opera 9+ (from page  http://docs.jquery.com/Browser_Compatibility )

comment:3 Changed 2 years ago by jitter

  • Keywords needsdocs added

Thanks for the additional feedback. That page needs an update anyway, your report is a good reminder to do that.

comment:4 Changed 2 years ago by dmethvin

  • Keywords needsdocs removed

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.