mend removal of adjacent jsdialog wizard items by name.
Change-Id: Id91a58cde7581d23aeb82a95f26a1c0e1352e411 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89067 Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
This commit is contained in:
parent
16578f0353
commit
6197b25959
1 changed files with 7 additions and 5 deletions
|
@ -399,7 +399,7 @@ L.Control.MobileWizard = L.Control.extend({
|
|||
|
||||
_removeItems: function (data, items) {
|
||||
if (data.children) {
|
||||
for (var i = 0; i < data.children.length; i++) {
|
||||
for (var i = 0; i < data.children.length;) {
|
||||
var childRemoved = false;
|
||||
for (var j = 0; j < items.length; j++) {
|
||||
if (data.children[i].id === items[j]) {
|
||||
|
@ -408,10 +408,12 @@ L.Control.MobileWizard = L.Control.extend({
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (childRemoved && i > 0)
|
||||
i = i - 1;
|
||||
if (data.children[i])
|
||||
this._removeItems(data.children[i], items);
|
||||
if (!childRemoved)
|
||||
{
|
||||
if (data.children[i])
|
||||
this._removeItems(data.children[i], items);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue