Bug Tracker

Ticket #1968 (closed bug: invalid)

Opened 10 months ago

Last modified 9 months ago

"g has no properties" + fix

Reported by: daimoni Assigned to: davidserduke
Type: bug Priority: minor
Milestone: 1.2.2 Component: core
Version: 1.2.1 Keywords:
Cc: Needs: Test Case

Description

Hello.

There's a small in 1.2.1 that causes firefox to say "g has no properties" and ie display error on page when using $().hover.

No patch included, sorry.. but the bug is easy to notice -

Here's the fixed code.. Notice that hover: function takes f and g parameters, and after that initializes private function. However, in JQuery's code g-parameter is not passed to the private function at all, handleHover only takes e as parameter. Adding missing g to handleHover makes all shiny again.

Lines around 1900 or so:

	hover: function(f,g) {
		// A private function for handling mouse 'hovering'
		function handleHover(e,g) {
			// Check if mouse(over|out) are still within the same parent element
			var p = e.relatedTarget;

Attachments

Change History

Changed 10 months ago by davidserduke

  • need changed from Review to Test Case
  • owner set to davidserduke
  • status changed from new to assigned

I am unable to reproduce this bug in IE7. Does the wiki not work for you?

http://docs.jquery.com/Events/hover#overout

It shouldn't be necessary to pass in 'g' since it would be included by closure since the handleHover() function is inside hover(). If the wiki works but you still have a test case that fails please attach it otherwise this bug will be closed.

Changed 9 months ago by davidserduke

  • status changed from assigned to closed
  • resolution set to invalid

The only way I've been able to get that message is when the second function parameter is missing like happened in ticket #1754. If you have an actual test case where this happens please reopen the bug and attach it.

Note: See TracTickets for help on using tickets.