This is a migrated thread and some comments may be shown as answers.

drawDOM drops a div tag in Chrome, but not in IE or Firefox

1 Answer 50 Views
Drawing API
This is a migrated thread and some comments may be shown as answers.
Hoanh
Top achievements
Rank 1
Hoanh asked on 11 Aug 2016, 11:08 PM

We generate a rather complex nested div and when we use drawDOM to export to PDF it works most of the time.  Sometimes, however, it drops one of the internal divs.  This only happens in Chrome, and not in IE or Firefox.

Please see sample code at dojo.telerik.com/uTAnE/5

Note then when run Safari, the exported PDF correctly includes both boxes on the 13th (the yellow and the gray box).  On Chrome, however, the yellow box is missing.  This seems to be data-dependent as if we have more internal boxes, everything is OK.

Any help you could provide would be greatly appreciated.

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 16 Aug 2016, 07:16 AM
Hi Hoanh,

The problem is caused by Chrome's unstable sorting algorithm. When absolute positioning is used, the dramDOM implementation prepares a list of DOM elements, sorted by their z-index. Since z-index is not set in this case, the element order should match their rendering order, but this is not the case in Chrome. As a result, one white box ends up being placed over a colored box.

The easiest workaround is to apply z-index to all the colored boxes that should reside over the white background boxes.

I have logged the issue for fixing and updated your Telerik points. Thanks for reporting this.

https://github.com/telerik/kendo-ui-core/issues/2071

Regards,
Dimo
Telerik by Progress
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Tags
Drawing API
Asked by
Hoanh
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or