Skip to content

Commit

Permalink
Fix IE text selection not working when draggable (#57)
Browse files Browse the repository at this point in the history
* Upgrade react-dnd

* Only draggable when not editing. Fixes (#56)
  • Loading branch information
nstrelow authored and rs22 committed Mar 8, 2018
1 parent d33f48e commit 7d1124c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion frontend/lib/js/previous-queries/list/PreviousQuery.js
Expand Up @@ -68,8 +68,9 @@ const PreviousQuery = (props) => {
const executedAt = moment(query.createdAt).fromNow();
const label = query.label || query.id.toString();
const mayEditQuery = query.own || query.shared;
const isNotEditing = !(query.editingLabel || query.editingTags);

return props.connectDragSource(
const content = (
<div className={classnames('previous-query', {
'previous-query--own': !!query.own,
'previous-query--shared': !!query.shared,
Expand Down Expand Up @@ -168,6 +169,7 @@ const PreviousQuery = (props) => {
}
</div>
);
return isNotEditing ? props.connectDragSource(content) : content;
};

PreviousQuery.propTypes = {
Expand Down
4 changes: 2 additions & 2 deletions frontend/package.json
Expand Up @@ -40,8 +40,8 @@
"react": "^16.2.0",
"react-addons-test-utils": "^15.3.1",
"react-datepicker": "1.2.1",
"react-dnd": "^2.1.4",
"react-dnd-html5-backend": "^2.1.2",
"react-dnd": "^2.5.4",
"react-dnd-html5-backend": "^2.5.4",
"react-dom": "^16.2.0",
"react-dropzone": "^4.2.8",
"react-list": "^0.8.0",
Expand Down
4 changes: 2 additions & 2 deletions frontend/yarn.lock
Expand Up @@ -6358,13 +6358,13 @@ react-datepicker@1.2.1:
react-onclickoutside "^6.7.1"
react-popper "^0.8.2"

react-dnd-html5-backend@^2.1.2:
react-dnd-html5-backend@^2.5.4:
version "2.5.4"
resolved "https://registry.yarnpkg.com/react-dnd-html5-backend/-/react-dnd-html5-backend-2.5.4.tgz#974ad083f67b12d56977a5b171f5ffeb29d78352"
dependencies:
lodash "^4.2.0"

react-dnd@^2.1.4:
react-dnd@^2.5.4:
version "2.5.4"
resolved "https://registry.yarnpkg.com/react-dnd/-/react-dnd-2.5.4.tgz#0b6dc5e9d0dfc2909f4f4fe736e5534f3afd1bd9"
dependencies:
Expand Down

0 comments on commit 7d1124c

Please sign in to comment.