Skip to content

Commit

Permalink
- when hovering a draggable over existing dropped draggable, change z…
Browse files Browse the repository at this point in the history
…-index to 1 to display OVER dropped one, not UNDER!

- Add margin if dropzone container has tip #102 h5p/h5p-drag-text#102

Signed-off-by: rezeau <[email protected]>
  • Loading branch information
rezeau committed May 30, 2022
1 parent 117861f commit a46989d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/scripts/droppable.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ H5P.TextDroppable = (function ($) {
tipLabel: self.params.tipLabel,
tabcontrol: true
});
self.$dropzoneContainer.addClass('has-tip');
self.$dropzoneContainer.append(self.$tip);

// toggle tabindex on tip, based on dropzone focus
Expand Down
7 changes: 6 additions & 1 deletion src/styles/drag-text.css
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@
overflow: hidden;
background: #ddd;
box-shadow: 0 0 0.3em rgba(0,0,0,0.2);
z-index: 3;
/* 3-> 1 papi jo to display over other draggables */
z-index: 1;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
Expand Down Expand Up @@ -295,3 +296,7 @@
.h5p-drag-text .h5p-question-introduction {
outline: none;
}

.h5p-drag-text .h5p-drag-dropzone-container.has-tip {
margin-right: 0.25em;
}

0 comments on commit a46989d

Please sign in to comment.