mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-08 15:25:01 -04:00
[#181] disable popovers on mobile UI on init and resizing events
This commit is contained in:
parent
a252c34968
commit
4a761673c0
6 changed files with 42 additions and 9 deletions
|
@ -185,18 +185,18 @@ class OperationsWaiter {
|
|||
if ( window.innerWidth < this.app.breakpoint ){
|
||||
this.disableOpsListPopovers();
|
||||
} else {
|
||||
this.enableOpsListPopovers(e.target);
|
||||
this.enableOpPopover(e.target);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets up popovers, allowing the popover itself to gain focus which enables scrolling
|
||||
* and other interactions.
|
||||
* Enable the target operation popover itself to gain focus which
|
||||
* enables scrolling and other interactions.
|
||||
*
|
||||
* @param {Element} el - The element to start selecting from
|
||||
*/
|
||||
enableOpsListPopovers(el) {
|
||||
enableOpPopover(el) {
|
||||
$(el).find("[data-toggle=popover]").addBack("[data-toggle=popover]")
|
||||
.popover({trigger: "manual"})
|
||||
.on("mouseenter", function(e) {
|
||||
|
@ -218,6 +218,7 @@ class OperationsWaiter {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Disable popovers on all op-list list items
|
||||
*/
|
||||
|
@ -225,6 +226,13 @@ class OperationsWaiter {
|
|||
$(document.querySelectorAll(".op-list .operation")).popover("disable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable popovers on all op-list list items
|
||||
*/
|
||||
enableOpsListPopovers(){
|
||||
$(document.querySelectorAll(".op-list .operation")).popover("enable");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handler for operation doubleclick events.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue