Skip to content

Commit edbffb8

Browse files
Issue 526 - Copy/paste does not work in certain situations (#728)
1 parent aceddf3 commit edbffb8

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

packages/dash-table/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
55
## [Unreleased]
66
### Fixed
77
- [#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
8+
- [#728](https://github.com/plotly/dash-table/pull/728) Fix copy/paste on readonly cells
89

910
## [4.6.2] - 2020-04-01
1011
### Changed

packages/dash-table/src/dash-table/components/CellLabel/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export default class CellLabel extends PureComponent<IProps> {
4444
const el = this.refs.el as HTMLDivElement;
4545

4646
if (applyFocus && el && document.activeElement !== el) {
47+
window.getSelection()?.selectAllChildren(el);
4748
el.focus();
4849
}
4950
}

packages/dash-table/src/dash-table/components/Table/Table.less

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -396,20 +396,22 @@
396396
.dash-cell-value {
397397
height: 100%;
398398
width: 100%;
399-
}
400399

401-
input.dash-cell-value {
402-
position: absolute;
403-
left: 0;
404-
top: 0;
405400
&.unfocused::selection {
406401
background-color: transparent;
407402
}
403+
408404
&.unfocused {
409405
caret-color: transparent;
410406
}
411407
}
412408

409+
input.dash-cell-value {
410+
position: absolute;
411+
left: 0;
412+
top: 0;
413+
}
414+
413415
.cell-value-shadow {
414416
margin: auto 0;
415417
opacity: 0;

0 commit comments

Comments
 (0)