Skip to content

Commit 75e6243

Browse files
committed
Prevent selected children after multiple transitions with user-select: none.
1 parent ea7f3e3 commit 75e6243

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### v3.0.1 (2 October 2017)
22

3-
* [BUGFIX] Stop clearing the selection after an animation since it causes child form inputs to lose focus on each update. (#50)
3+
* [BUGFIX] Prevent animating child selection with CSS rather than clearing with JS so form inputs don't lose focus on each update. (#50)
44

55
### v3.0.0 (27 August 2017)
66

src/ReactCSSTransitionReplace.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ export default class ReactCSSTransitionReplace extends React.Component {
281281
left: 0,
282282
right: 0,
283283
bottom: 0,
284+
// In Chrome a selection on a child due to multiple clicks often transfers to the final child after
285+
// the transitions completes. This prevents selection of the child without other side-effects.
286+
userSelect: 'none',
284287
}
285288

286289
Object.keys(prevChildren).forEach(key => {

0 commit comments

Comments
 (0)