-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Applying consecutive .splice on array of primitives with overlapping values fails #3682
Closed
3 tasks done
Labels
Comments
This was referenced May 29, 2016
tomalec
added a commit
to Palindrom/palindrom-client
that referenced
this issue
May 30, 2016
+1 |
+1 |
Was this resolved? It's an issue with use of set object for faux dirty
check. Ira into same issue in independent bind system. If issue still
exists. More than willing to pr and doc it let me know.
Thanks and good luck.
J
On Thu, Jun 22, 2017 at 4:51 AM Konstantin ***@***.***> wrote:
+1
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3682 (comment)>,
or mute the thread
</~https://github.com/notifications/unsubscribe-auth/AHxnvkkIJAJbGWRLy7gBhA3ZvzQ_gEGkks5sGir9gaJpZM4IpVvo>
.
--
…_________________________________
Jason C. Frazzano Esq.
Founder and Master Coach, Focused Coaching
Stanford University, B.A. M.A., with honors and distinction
Columbia Law School, J.D., Stone Scholar
www.focusedcoaching.com
jason@focusedcoaching.com
jfrazzano@gmail.com
office: 732-671-1834
|
This is not resolved yet. |
Update: this behavior seems to be fixed in Polymer 2.x. |
Confirmed this has been fixed in Polymer 2: http://jsbin.com/pawopihera/edit?html,console,output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I try to apply
.splice
consecutively on same element, to alter the array of primitive values. When new value insplice
is equal to any existing one (in different place), rendered result and data object gets corrupted.Live Demo
http://jsbin.com/bimipe/edit?html,console,output
Steps to Reproduce
Example:
Create a template with
Set
model.array = [0,1]
Check that you can see:
Try to change
array[0]
to1
andarray[1]
to2
withsplice
method:Expected Results
The DOM should be changed to reflect
[1,2]
:Actual Results
Corrupted result is rendered:
Browsers Affected
Versions
Investigation notes
Replacing these items with unique ones works fine
Calling each splice individually works:
or
Calling them asynchronously works:
Even though "normalized" is not defined anywhere (Notifying consecutive array changes #2752 (comment)), when the
splices
are executed in anti-normalized order (last index to first), it also worksI suspect DOM binding engine thinks first
1
is the same object as one introduced inspliced
and messes things up.The text was updated successfully, but these errors were encountered: