diff --git a/CHANGELOG.md b/CHANGELOG.md index c396cdbe5..181b4ccc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] ### Fixed - [#722](https://github.com/plotly/dash-table/pull/722) Fix a bug where row height is misaligned when using fixed_columns and/or fixed_rows +- [#728](https://github.com/plotly/dash-table/pull/728) Fix copy/paste on readonly cells ## [4.6.2] - 2020-04-01 ### Changed diff --git a/src/dash-table/components/CellLabel/index.tsx b/src/dash-table/components/CellLabel/index.tsx index 03ff5f96b..7a0d2b7e1 100644 --- a/src/dash-table/components/CellLabel/index.tsx +++ b/src/dash-table/components/CellLabel/index.tsx @@ -44,6 +44,7 @@ export default class CellLabel extends PureComponent { const el = this.refs.el as HTMLDivElement; if (applyFocus && el && document.activeElement !== el) { + window.getSelection()?.selectAllChildren(el); el.focus(); } } diff --git a/src/dash-table/components/Table/Table.less b/src/dash-table/components/Table/Table.less index 596976ad1..7162d7034 100644 --- a/src/dash-table/components/Table/Table.less +++ b/src/dash-table/components/Table/Table.less @@ -396,20 +396,22 @@ .dash-cell-value { height: 100%; width: 100%; - } - input.dash-cell-value { - position: absolute; - left: 0; - top: 0; &.unfocused::selection { background-color: transparent; } + &.unfocused { caret-color: transparent; } } + input.dash-cell-value { + position: absolute; + left: 0; + top: 0; + } + .cell-value-shadow { margin: auto 0; opacity: 0;