Ticket #1415 (closed defect: wontfix)

Opened 16 months ago

Last modified 3 weeks ago

Having duplicate Behaviour.register calls (on same element and event) makes neither get called

Reported by: elijahlofgren Owned by: hsmith
Priority: medium Milestone:
Component: CMS - General Version:
Severity: medium effort / impact Keywords: jsrewrite
Cc: Hours:

Description

For me, using both:

Behaviour.register({
	'input#Form_EditForm_Title': {
		onchange: function() {
alert('something');
	}
});

and:

Behaviour.register({
	'input#Form_EditForm_Title': {
		onchange: function() {
alert('something else');
	}
});

results in neither being called. Not idea I think.

http://groups.google.com/group/behaviour/tree/browse_frm/month/2005-10/145dba537ac5818a?rnum=11&_done=%2Fgroup%2Fbehaviour%2Fbrowse_frm%2Fmonth%2F2005-10%3F "If, for example, I want to assign an event to some 'a' tags, but I also want to have the option in the future to assign another event to selected 'a' tags. If my experiments are correct, having one universal 'a' rule overwrites any other more specific 'a.example' rules I might have later. "

http://encytemedia.com/event-selectors/ "You use pseudo event selectors to apply events. You can also use the same callback for more than one selector encouraging code reuse."

Change History

Changed 3 months ago by sminnee

  • priority changed from minor to medium
  • harvest_task set to (Unknown)
  • invoice_sent set to 0

Migrating our code to jQuery will help with this. See http://open.silverstripe.com/wiki/development/javascriptplatform

Raising priority since it's part of the js rewrite.

Changed 3 months ago by sminnee

  • keywords jsrewrite added

Changed 3 weeks ago by sminnee

  • status changed from new to closed
  • resolution set to wontfix

Rather than tidy up Behaviour, we'll remove it and use jQuery.

Note: See TracTickets for help on using tickets.