When an element that has been connected to datetimepicker object has been dynamically removed due to dynamic content changes the javascript starts throwing errors on window resize events regarding getComputedStyle receiving nulls in its 0 argument. Re-check the value before calling resolves the issue.

This commit is contained in:
Edgars Kohs 2017-05-07 17:31:31 +07:00
parent ec0865991d
commit 0083f04c7d

View File

@ -2001,6 +2001,10 @@
dateInputHasFixedAncestor = false;
forEachAncestorOf(dateInputElem, function (ancestorNode) {
if (ancestorNode === null) {
return false;
}
if (options.contentWindow.getComputedStyle(ancestorNode).getPropertyValue('position') === 'fixed') {
dateInputHasFixedAncestor = true;
return false;