-
Notifications
You must be signed in to change notification settings - Fork 5
Timing issue with appending new items #32
Comments
We can write tests for this case. However, in general things like these can be fuzzed. I'm thinking about creating a list of behaviors an allowed props and then just append/remove/reorder a tons of elements and permutate all behaviors by using setAttribute/removeAttribute and wait until it crash. |
When a new element with a layout behavior is attached we have another issue. We're also doing unnecessary renders because of the events in Here's what we want:
Maybe Edit: same for connecting to |
The interpolate behavior suffers from a similar timing issue. this.connectTo('^guides-layout', this._createInterpolators.bind(this)); For new elements We could connect it to |
In theory we could get rid of all these problems by recreating everything when an element is added or removed. This way there would be a guarantee that everything is as consistent as it was for the very first render. |
So far the fuzz tests I'm writing right now caught all of these 🙌 |
Aaaand another one. I assume this happens when an element is added and removed from the DOM within the same frame.
|
Welp, |
…ncy type to only use attached layout behaviors, references #32
the |
The whole |
Maybe that's the way to go. In Firefox the editor does currently not work because |
This right here
scrollmeister/src/behaviors/GuidesLayoutBehavior.js
Line 141 in 4568a84
el.behaviors.hasOwnblabla(thing)
The text was updated successfully, but these errors were encountered: