Bug Tracker

Opened 13 years ago

Closed 13 years ago

#1968 closed bug (invalid)

"g has no properties" + fix

Reported by: daimoni Owned by: davidserduke
Priority: minor Milestone: 1.2.2
Component: core Version: 1.2.1
Keywords: Cc:
Blocked by: Blocking:

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;

Change History (2)

comment:1 Changed 13 years ago by davidserduke

need: ReviewTest Case
Owner: set to davidserduke
Status: newassigned

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.

comment:2 Changed 13 years ago by davidserduke

Resolution: invalid
Status: assignedclosed

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.