ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

ui5-table: cannot select text from table cell

Open tamiarah opened this issue 6 years ago • 3 comments

Describe the bug It is not possible to select the content of a table cell in case you want to copy the text from this cell. It is only working for the column headers but not in the rows. It is working in your example here: https://sap.github.io/ui5-webcomponents/playground/components/Table/ However, it is not working now, when implementing a table and then trying to copy the cell content.

To reproduce Steps to reproduce the behavior:

  1. See attached link and try to copy "test" from the table row.

Isolated example https://codesandbox.io/s/ui5-webcomponents-0kt3c?fontsize=14&hidenavigation=1&theme=dark

Expected behavior It should be possible to select the content, that you can copy it.

Context

  • UI5 Web Components version: 1.0.0-rc.5
  • OS/Platform: Mac OS

Affected components ui5-table (ui5-table-cell, ui5-table-row)

Thanks! Christina

tamiarah avatar Jan 29 '20 10:01 tamiarah

Hello @tamiarah

Thanks for reporting.

If you wrap the text nodes in spans - the text would be selectable. We still don't know why it's not working your way.

 <ui5-table-cell><span>test</span></ui5-table-cell>

ilhan007 avatar Jan 29 '20 13:01 ilhan007

Hi @ilhan007

Thanks for your fast response and the workaround with the span!

tamiarah avatar Jan 29 '20 14:01 tamiarah

Unfortunately, I could not find the root cause, but as there is fine workaround I will close the issue

I hope it is fine for you.

Best, ilhan

ilhan007 avatar Feb 26 '20 08:02 ilhan007