diff --git a/lib/timeline/Timeline.js b/lib/timeline/Timeline.js index 97eafd24..aeae38c6 100644 --- a/lib/timeline/Timeline.js +++ b/lib/timeline/Timeline.js @@ -63,7 +63,12 @@ function Timeline (container, items, groups, options) { this._create(container); if (!options || (options && typeof options.rtl == "undefined")) { - this.options.rtl = window.getComputedStyle(this.dom.root, null).direction == "rtl"; + var directionFromDom, domNode = this.dom.root; + while (!directionFromDom && domNode) { + directionFromDom = window.getComputedStyle(domNode, null).direction; + domNode = domNode.parentElement; + } + this.options.rtl = (directionFromDom && (directionFromDom.toLowerCase() == "rtl")); } else { this.options.rtl = options.rtl; }