Skip to content

Commit

Permalink
Fixed hover issue - now allows scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
mattnotmitt committed Jul 28, 2017
1 parent 33ecbfa commit 9ee0964
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/web/HTMLOperation.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ HTMLOperation.prototype.toStubHtml = function(removeIcon) {
let html = "<li class='operation'";

if (this.description) {
html += " data-container='body' data-toggle='popover' data-placement='auto right'\
data-content=\"" + this.description + "\" data-html='true' data-trigger='focus' tabindex='0'";
html += " data-container='body' data-placement='auto right'\
data-content=\"" + this.description + "\"";
}

html += ">" + this.name;
Expand Down
17 changes: 16 additions & 1 deletion src/web/OperationsWaiter.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,22 @@ OperationsWaiter.prototype.getSelectedOp = function(ops) {
*/
OperationsWaiter.prototype.opListCreate = function(e) {
this.manager.recipe.createSortableSeedList(e.target);
$("[data-toggle=popover]").popover();
// Allows popover to gain focus for eg. pressing buttons/scrolling
$(".operation").popover({trigger: "manual", html: true, animation: true})
.on("mouseenter", function () {
const _this = this;
$(this).popover("show");
$(".popover").on("mouseleave", function () {
$(_this).popover("hide");
});
}).on("mouseleave", function () {
const _this = this;
setTimeout(function () {
if (!$(".popover:hover").length) {
$(_this).popover("hide");
}
}, 50);
});
};


Expand Down

0 comments on commit 9ee0964

Please sign in to comment.