mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
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:
parent
ec0865991d
commit
0083f04c7d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user