Side navigation
#12934 closed bug (notabug)
Opened November 21, 2012 07:55AM UTC
Closed November 21, 2012 05:56PM UTC
Last modified November 21, 2012 06:14PM UTC
literal object event listener causes "too much recursion" error
Reported by: | vinci@hkday.net | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I found when I use a custom event trigger & listener, the listener of the object may fall into too much recursion loop and overflow the stack
Demo:
http://codepen.io/vincicat/pen/bIjzJ
I am able to stop it by calling e.preventDefault() & e.stopProgation() in the event listener for the object event (line 12)
Fixed Demo:
http://codepen.io/vincicat/full/fdLqr
it seems like a bug as the callback loop itself. Any idea?
Attachments (0)
Change History (2)
Changed November 21, 2012 05:56PM UTC by comment:1
resolution: | → notabug |
---|---|
status: | new → closed |
Changed November 21, 2012 06:14PM UTC by comment:2
Replying to [comment:1 dmethvin]:
You're triggering an event name with the same name as your method. Please read the docs for .trigger() and use .triggerHandler() if you don't want that.
Thx. I finally find that important note in the bottom of the doc - if the box is shown like $.load() that will make people notice.
You're triggering an event name with the same name as your method. Please read the docs for .trigger() and use .triggerHandler() if you don't want that.