SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.51k stars 262 forks source link

[ui5-table]: there has a blank page when print table content more than one page #7297

Closed GongRichard closed 1 year ago

GongRichard commented 1 year ago

Bug Description

There has a blank page when print table content more than one page

Affected Component

ui5-table

Expected Behaviour

No response

Isolated Example

No response

Steps to Reproduce

  1. open page https://sap.github.io/ui5-webcomponents/playground/iframe.html?id=main-table--growing-table-more-button&viewMode=story
  2. click more button to show more than 36 rows
  3. use browser print function to print the table
  4. you can see a blank page first and the bottom row was broken

Log Output, Stack Trace or Screenshots

image

Priority

High

UI5 Web Components Version

1.15.x

Browser

Chrome, Edge

Operating System

No response

Additional Context

No response

Organization

SAP SuccessFactors

Declaration

ivoplashkov commented 1 year ago

Hello colleagues,

The issue is reproducible as described above.

Could you please check? Regards, Ivaylo

GongRichard commented 1 year ago

Hi colleagues, Please take this issue as high priority, we need deliver the print function to customer in this release. Can this issue be fixed before Aug. 31th? Thanks, Richard

hristop commented 1 year ago

Hi @GongRichard ,

We believe that we have found the reason for this issue, however the fix will be available in the August release of the web components the earliest. There is a workaround for the issue though, if you make add style "display: block" to the ui5-table element, the printing should be ok.

Best Regards, Hristo

MapTo0 commented 1 year ago

Hello @GongRichard ,

The issue is Chromium specific and I have raised an issue in their project. Lets see Chromium team statement on the topic and we will see how to proceed with that. As a workaround you have a few options.

  1. Remove the margin of the body tag (recommended) https://jsbin.com/sofuhuvawo/1/edit?html,console
  2. Set display: block to the ui5-table tag

Best Regards, Martin

MapTo0 commented 1 year ago

Hello @GongRichard

Chromium team closed the issue by saying that this is by Design and they are not willing to change it. https://bugs.chromium.org/p/chromium/issues/detail?id=1468957

Did you try any of the approaches described above? Are these working solution for you?

Best Regards, Martin

GongRichard commented 1 year ago

Hi @MapTo0,

I have tried workaround, it works well.

Thanks, Richard

MapTo0 commented 1 year ago

Since a major refactoring of the Table component is ongoing I would suggest we stay with the workaround for now. (Its not a workaround for the component, rather than a workaround for the browser functionality).

Best Regards, Martin