You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In dom v20 the ownerTarget property on the event stayed consistent between emitting event and calling the reducer. In v22, the ownerTarget property is correct when the events stream emission takes place but is overwritten by the time the reducer is run. This is because the reducer is run on the next turn of the event-loop, so by time the reducer is called the new simulated bubbling code in EventDelegator has overwritten that property multiple times as the bubbling was simulated. I don't consider this a bug as much as a backwards-incompatibility. In v20 it was valid to pass the event directly to the reducer and inquire the value within the reducer. In v22 the ownerTarget value must be extracted immediately upon event-stream emission (synchronously) so it can directly be included in the closure associated with the reducer. If this is not a bug then this change should be documented.
The text was updated successfully, but these errors were encountered:
Code to reproduce the issue:
In dom v20 the
ownerTarget
property on the event stayed consistent between emitting event and calling the reducer. In v22, theownerTarget
property is correct when the events stream emission takes place but is overwritten by the time the reducer is run. This is because the reducer is run on the next turn of the event-loop, so by time the reducer is called the new simulated bubbling code inEventDelegator
has overwritten that property multiple times as the bubbling was simulated. I don't consider this a bug as much as a backwards-incompatibility. In v20 it was valid to pass the event directly to the reducer and inquire the value within the reducer. In v22 theownerTarget
value must be extracted immediately upon event-stream emission (synchronously) so it can directly be included in the closure associated with the reducer. If this is not a bug then this change should be documented.The text was updated successfully, but these errors were encountered: