Skip to content

Commit

Permalink
Merge pull request #12 from unicef-polymer/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
adi130987 authored Dec 5, 2016
2 parents 1d8b822 + 2e75655 commit 67747dd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions etools-repeatable-field-set.html
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,12 @@
this._itemCounter = this._isCopy;
this._isCopy = -1;
}
//this is to keep the counter in sync with the local dom,
// it can happen that they go out of sync. this prevent two element on the same row
var siblings = Polymer.dom(self.root).querySelectorAll('.item-content');
if(siblings.length !== self._itemCounter) {
self._itemCounter = siblings.length - 1;
}
children.forEach(function(child) {
var currentItem = self.$$('#item-' + self._itemCounter);
if(currentItem) {
Expand Down

0 comments on commit 67747dd

Please sign in to comment.