Hi,
I am not sure if this is a bug or expected behavior, but I observed that when I create element in Gantt widget using pushUpdate, gantt timeline "jumps" to some position. For me locally it jumps to today, on example dojo (attached below) it jumps to other position.
I did some debugging locally and as I could see this line in code triggers this focus:
pushUpdate: function (items) {
if (!isArray(items)) {
items = [items];
}
var pushed = [];
for (var idx = 0; idx < items.length; idx++) {
var item = items[idx];
var model = this._createNewModel(item);
var target = this.get(model.id);
if (target) {
pushed.push(target);
target.accept(item);
target.trigger(CHANGE); //FOR ME HERE IT FOCUSES
this._updatePristineForModel(target, item);
} else {
this.pushCreate(item);
}
}
if (pushed.length) {
this.trigger('push', {
type: 'update',
items: pushed
});
}
},
Behavior can be observed on this dojo, with the following steps:
- run dojo
- position gantt timeline somewhere in the future (i tried several dates)
- click 'add item' button to add EXAMPLE element via pushUpdate
Result: Gantt "jumps" the timeline (at least for me) to 05.07. - 06.07.
Thank you and regards
Vedad