mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Fix #2451 unable to drag select text without closing card details
This commit is contained in:
parent
2c78aab3dc
commit
74b5bdf2aa
1 changed files with 21 additions and 1 deletions
|
|
@ -321,6 +321,19 @@ BlazeComponent.extendComponent({
|
||||||
parentComponent.showOverlay.set(true);
|
parentComponent.showOverlay.set(true);
|
||||||
parentComponent.mouseHasEnterCardDetails = true;
|
parentComponent.mouseHasEnterCardDetails = true;
|
||||||
},
|
},
|
||||||
|
'mousedown .js-card-details'() {
|
||||||
|
Session.set('cardDetailsIsDragging', false);
|
||||||
|
Session.set('cardDetailsIsMouseDown', true);
|
||||||
|
},
|
||||||
|
'mousemove .js-card-details'() {
|
||||||
|
if (Session.get('cardDetailsIsMouseDown')) {
|
||||||
|
Session.set('cardDetailsIsDragging', true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'mouseup .js-card-details'() {
|
||||||
|
Session.set('cardDetailsIsDragging', false);
|
||||||
|
Session.set('cardDetailsIsMouseDown', false);
|
||||||
|
},
|
||||||
'click #toggleButton'() {
|
'click #toggleButton'() {
|
||||||
Meteor.call('toggleSystemMessages');
|
Meteor.call('toggleSystemMessages');
|
||||||
},
|
},
|
||||||
|
|
@ -777,7 +790,14 @@ BlazeComponent.extendComponent({
|
||||||
EscapeActions.register(
|
EscapeActions.register(
|
||||||
'detailsPane',
|
'detailsPane',
|
||||||
() => {
|
() => {
|
||||||
Utils.goBoardId(Session.get('currentBoard'));
|
if (Session.get('cardDetailsIsDragging')) {
|
||||||
|
// Reset dragging status as the mouse landed outside the cardDetails template area and this will prevent a mousedown event from firing
|
||||||
|
Session.set('cardDetailsIsDragging', false);
|
||||||
|
Session.set('cardDetailsIsMouseDown', false);
|
||||||
|
} else {
|
||||||
|
// Prevent close card when the user is selecting text and moves the mouse cursor outside the card detail area
|
||||||
|
Utils.goBoardId(Session.get('currentBoard'));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
return !Session.equals('currentCard', null);
|
return !Session.equals('currentCard', null);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue