Encountering a puzzling issue that exclusively affects Internet Explorer (any version) and not Chrome.
An "items" array is stored within the "doc" object. Users have the capability to edit items, which essentially deletes the item but retains its content in a text box for potential re-adding after modifications are made.
The edit function's code snippet:
$scope.editItem = function(index) {
console.log($scope.doc); //debugging
item = $scope.doc.items[index];
$scope.content = item.data
$scope.doc.items.splice(index,1);
};
Originally having 3 items, it has been observed during debugging that the console.log($scope.doc)
output on line 2 displays the doc with only 2 items, even prior to the array being spliced. The expectation was to see three total items.
Verification confirms that the index is correctly passed from the view, ruling out this as the source of the problem.
What could be causing this unexpected behavior?