Skip to main content

Bug Tracker

Side navigation

#1968 closed bug (invalid)

Opened November 25, 2007 08:29AM UTC

Closed November 29, 2007 01:28AM UTC

"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;
Attachments (0)
Change History (2)

Changed November 27, 2007 04:02PM UTC by davidserduke comment:1

need: ReviewTest Case
owner: → 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.

Changed November 29, 2007 01:28AM UTC by davidserduke comment:2

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.