Skip to main content

Bug Tracker

Side navigation

#10081 closed bug (invalid)

Opened August 17, 2011 09:32PM UTC

Closed August 22, 2011 06:02PM UTC

Last modified May 02, 2012 02:14AM UTC

jQuery event handler

Reported by: shehriyari Owned by: shehriyari
Priority: low Milestone:
Component: event Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:
Description

Line 2965 in jquery.js:

var ret = handleObj.handler.apply( this, args );
if ( ret !== undefined ) {
	event.result = ret;
	if ( ret === false ) {
		event.preventDefault();
		event.stopPropagation();
	}
}

In my code, the value for handleObj.handler property sometimes becomes an array, and thus apply() doesn't work. I get error saying "handleObj.handler.apply() is not a function". Shouldn't there be a control statement, which would check whether handleObj.handler has apply() method assigned to it or not?

You can view my code at: http://shehi.dyndns.org/acp/components/ .

Press CREATE NEW under ''Subroutine Management''. Select ''Data-source=Module RDBMS ...''. Go to just-enabled ''Data-source'' tab; there select Fetch Criteria - Queries & Query Groups (Policies) = FETCH SELECTED. You will get the mentioned error... Check console for output...

Attachments (0)
Change History (9)

Changed August 17, 2011 09:38PM UTC by shehriyari comment:1

_comment0: In the console, I log '''event''' argument that is passed to Event-handler function, which is change-event in my case. All of the SELECTs in the use the same handler function, and if you check the objects in the console, you will see that '''handler''' property has a FUNCTION as value, which is correct. But when I "change" the SELECT of ''Fetch Criteria - Queries & Query Groups (Policies)'', I get '''handler = [all]'''. Shouldn't it be FUNCTION?! Why the value of SELECT is assigned to the handler property?!1313617758100200

In the console, I log event argument that is passed to Event-handler function, which is change-event in my case. All of the SELECT.js_trigger_on_change elements there use the same handler function, and if you check the objects in the console, you will see that handler property has a FUNCTION as value, which is correct. But when I "change" the SELECT of ''Fetch Criteria - Queries & Query Groups (Policies)'', I get handler = [all]. Shouldn't it be FUNCTION?! Why the value of SELECT is assigned to the handler property?!

Changed August 17, 2011 09:46PM UTC by shehriyari comment:2

_comment0: My apologies, the URL mentioned above should be as: \ http://shehi.dyndns.org/acp/components/viewmodule-da00411bc15ca9ae98ca2db1f3df7a7a1314022875879813

Changed August 17, 2011 09:57PM UTC by rwaldron comment:3

component: unfiledevent
milestone: None1.6.3
owner: → shehriyari
priority: undecidedlow
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket! We do appreciate you providing the above link.

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/

Open the link and click to "Fork" (in the top menu) to get started.

Changed August 21, 2011 02:22AM UTC by shehriyari comment:4

status: pendingnew

@rwaldron: I can't give you reduced test case, because this particular situation only happens in 2 of my SELECTs I mentioned above. If I could narrow down the cause, I would've solved it myself :) I know it is weird, but we will have to dig into this dirty case using the example I provided... Sorry for being unhelpful :(

Changed August 22, 2011 02:25PM UTC by shehriyari comment:5

Guess this one won't get noticed because of my very big "sample", am I right? :( . I am open-source developer working on my CMS software, and I really would appreciate any help on this matter. My code is both in Google Code Eclipse Labs and Github. Thanks for any help in advance!

Changed August 22, 2011 06:02PM UTC by dmethvin comment:6

milestone: 1.6.3
resolution: → invalid
status: newclosed

Sorry but there isn't enough information here to reproduce or check the bug. It's possible this is a dup of #9593 which should be fixed in 1.7.

Changed February 11, 2012 04:27PM UTC by postbin@bk.ru comment:7

I have the same bug in my app with Jquery 1.7.1

I attached change handler to input: text element.

And when text is changed there is this error (at least i when i try in firefox 9).

At other places in my code the handler works normally.

Changed May 01, 2012 10:49AM UTC by desi@myfamilyclub.co.uk comment:8

I've got the same problem using the latest version of JQuery.

http://jsfiddle.net/ayXy7/

Changed May 02, 2012 02:14AM UTC by dmethvin comment:9

@desi,

$('.subnav li .level-1').hover('touchstart', function(e) {

There is no signature of .hover() like this. Please ask for help on the forum or StackOverflow.