Commit 925a8ed1 authored by Jacob Schatz's avatar Jacob Schatz Committed by Ruben Davila

Merge branch 'issue-boards-tooltip-hide' into 'master'

Issue boards tooltip hide

- Hides & disables tooltips when dragging issues or lists
- Fixes bug where cursor wouldn't change when dragging.

See merge request !5889
parent c1e3f35f
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
draggable: '.is-draggable', draggable: '.is-draggable',
handle: '.js-board-handle', handle: '.js-board-handle',
onEnd: (e) => { onEnd: (e) => {
document.body.classList.remove('is-dragging'); gl.issueBoards.onEnd();
if (e.newIndex !== undefined && e.oldIndex !== e.newIndex) { if (e.newIndex !== undefined && e.oldIndex !== e.newIndex) {
const order = this.sortable.toArray(), const order = this.sortable.toArray(),
......
...@@ -63,6 +63,8 @@ ...@@ -63,6 +63,8 @@
Store.moving.issue = card.issue; Store.moving.issue = card.issue;
Store.moving.list = card.list; Store.moving.list = card.list;
gl.issueBoards.onStart();
}, },
onAdd: (e) => { onAdd: (e) => {
gl.issueBoards.BoardsStore.moveIssueToList(Store.moving.list, this.list, Store.moving.issue); gl.issueBoards.BoardsStore.moveIssueToList(Store.moving.list, this.list, Store.moving.issue);
......
...@@ -25,12 +25,8 @@ ...@@ -25,12 +25,8 @@
delay: gl.issueBoards.touchEnabled ? 100 : 0, delay: gl.issueBoards.touchEnabled ? 100 : 0,
scrollSensitivity: gl.issueBoards.touchEnabled ? 60 : 100, scrollSensitivity: gl.issueBoards.touchEnabled ? 60 : 100,
scrollSpeed: 20, scrollSpeed: 20,
onStart () { onStart: gl.issueBoards.onStart,
document.body.classList.add('is-dragging'); onEnd: gl.issueBoards.onEnd
},
onEnd () {
document.body.classList.remove('is-dragging');
}
} }
Object.keys(obj).forEach((key) => { defaultSortOptions[key] = obj[key]; }); Object.keys(obj).forEach((key) => { defaultSortOptions[key] = obj[key]; });
......
...@@ -8,9 +8,13 @@ ...@@ -8,9 +8,13 @@
} }
.is-dragging { .is-dragging {
// Important because plugin sets inline CSS
opacity: 1!important;
* { * {
cursor: -webkit-grabbing; // !important to make sure no style can override this when dragging
cursor: grabbing; cursor: -webkit-grabbing!important;
cursor: grabbing!important;
} }
} }
...@@ -246,11 +250,6 @@ ...@@ -246,11 +250,6 @@
opacity: 0.3; opacity: 0.3;
} }
.is-dragging {
// Important because plugin sets inline CSS
opacity: 1!important;
}
.card { .card {
position: relative; position: relative;
width: 100%; width: 100%;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment