summaryrefslogtreecommitdiffstats
path: root/client/components
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-09-10 18:22:10 +0200
committerMaxime Quandalle <maxime@quandalle.com>2015-09-10 18:22:10 +0200
commite65c79edfadb67f3859e02ae55ad75369b7ebc17 (patch)
tree8d97afa49bd3957dce59b8c9d9d386d5025d2349 /client/components
parent1c805e084fd5689c0df1f1d47011f33753eed14b (diff)
downloadwekan-e65c79edfadb67f3859e02ae55ad75369b7ebc17.tar.gz
wekan-e65c79edfadb67f3859e02ae55ad75369b7ebc17.tar.bz2
wekan-e65c79edfadb67f3859e02ae55ad75369b7ebc17.zip
Fix text selection in the card detailed pane
Fixes #255.
Diffstat (limited to 'client/components')
-rw-r--r--client/components/boards/boardBody.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js
index 980a9015..95590beb 100644
--- a/client/components/boards/boardBody.js
+++ b/client/components/boards/boardBody.js
@@ -68,7 +68,13 @@ BlazeComponent.extendComponent({
// Click-and-drag action
'mousedown .board-canvas'(evt) {
- if ($(evt.target).closest('a,.js-list-header').length === 0) {
+ // Translating the board canvas using the click-and-drag action can
+ // conflict with the build-in browser mechanism to select text. We
+ // define a list of elements in which we disable the dragging because
+ // the user will legitimately expect to be able to select some text with
+ // his mouse.
+ const noDragInside = ['a', 'input', 'textarea', 'p', '.js-list-header'];
+ if ($(evt.target).closest(noDragInside.join(',')).length === 0) {
this._isDragging = true;
this._lastDragPositionX = evt.clientX;
}