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.

5 comments:

  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?

    ReplyDelete
  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.

    ReplyDelete
  3. There is almost certainly that an expert photography business degree from any of the outstanding photography schools can be the best asset for any photographer's showcasing achievement. An effective photographer ought figure out how to click magnum opus pictures as well as how to offer them. With the correct promoting methods, photography is one of the most secure vocation that somebody can pick and its imaginative side is captivating. https://www.keshot.com/photo-booth-rental/

    ReplyDelete
  4. Make a few inquiries and see who other marriage couples or association have utilized and why, or for what reason not, you would need to utilize a similar organization. trade show

    ReplyDelete