Skip to content

Commit a15034b

Browse files
committed
Merge branch 'bug/text-overflow' of https://github.com/artemisbot/CyberChef into artemisbot-bug/text-overflow
2 parents 1435acd + 9ee0964 commit a15034b

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

src/web/HTMLOperation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ HTMLOperation.prototype.toStubHtml = function(removeIcon) {
5050
let html = "<li class='operation'";
5151

5252
if (this.description) {
53-
html += " data-container='body' data-toggle='popover' data-placement='auto right'\
54-
data-content=\"" + this.description + "\" data-html='true' data-trigger='hover'";
53+
html += " data-container='body' data-placement='auto right'\
54+
data-content=\"" + this.description + "\"";
5555
}
5656

5757
html += ">" + this.name;

src/web/OperationsWaiter.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,22 @@ OperationsWaiter.prototype.getSelectedOp = function(ops) {
155155
*/
156156
OperationsWaiter.prototype.opListCreate = function(e) {
157157
this.manager.recipe.createSortableSeedList(e.target);
158-
$("[data-toggle=popover]").popover();
158+
// Allows popover to gain focus for eg. pressing buttons/scrolling
159+
$(".operation").popover({trigger: "manual", html: true, animation: true})
160+
.on("mouseenter", function () {
161+
const _this = this;
162+
$(this).popover("show");
163+
$(".popover").on("mouseleave", function () {
164+
$(_this).popover("hide");
165+
});
166+
}).on("mouseleave", function () {
167+
const _this = this;
168+
setTimeout(function () {
169+
if (!$(".popover:hover").length) {
170+
$(_this).popover("hide");
171+
}
172+
}, 50);
173+
});
159174
};
160175

161176

src/web/stylesheets/utils/_overrides.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ optgroup {
142142
border-color: var(--popover-border-colour);
143143
}
144144

145+
.popover-content {
146+
max-height: 90vh;
147+
overflow-y: auto;
148+
}
145149

146150
.popover.right>.arrow {
147151
border-right-color: var(--popover-border-colour);

0 commit comments

Comments
 (0)