Wednesday, March 2, 2016

Aurelia change event Firefox woes

In the continuing adventures of Firefox vs other browsers (see Aurelia Firefox and Input fields), I was watching a checkbox using a change.trigger() to update the checkbox selection state for a search facet.  I noticed in Firefox that the change event checkbox selection value was pre-change vs Chrome and other browsers where the selection value was post-change.

Gitter Aurelia conversation discussed the issue and approach to fix it.

Using change.delegate gives the change event time to finish processing before it's handled.  I'm a little concerned about timing issues still as this doesn't seem deterministic, but it's working pretty well now.


  1. Hi William. Thanks for your insights and your tutorials on custom events. I am using the code you wrote to help me with a problem I am facing.

    I have the problem you described, that is change.delegate firing before the value is changed on FF and after the change on Chrome. This is happening in a custom element.

    Do you suggest using the DOM level custom events or is there an Aurelia only solution that does not require jQuery of DOM medling of any sort?

    Do you think using change.trigger is an option?

  2. Hi Tseliso and Zohaib,

    I got more consistent results from change.delegate. FF might have resolved that difference at this point. Haven't re-checked it.

  3. This comment has been removed by the author.

  4. This comment has been removed by the author.

  5. They couldn't care less what number of super pixels we have, nor how much our hardware cost us, nor what brand of camera we use. Clipping Path Service

  6. Kalem Aquil is a 'semi-wore out' picture taker that apportions free, spontaneous (yet, excellent and precise) tips and counsel to sprouting photographic artists that need to take their photography business to the following to create a clipping mask in photoshop