[#181] fix glitchy modal popover ( popovers get reinitialised after drag events. This still happens on mobile ops-list )

This commit is contained in:
Robin Scholtes 2023-04-24 16:13:02 +12:00
parent 4a761673c0
commit 6a1501e7ae
3 changed files with 6 additions and 4 deletions

View file

@ -882,12 +882,12 @@ class App {
/** /**
* Aggregate all the desktop UI functions. * Aggregate all the desktop UI functions.
* *
* Popovers and desktop layout are set on init, but we also need to * Fires on window resize event ( on min-width breakpoint )
* update the UI correctly on window resizing events
*/ */
setDesktopUI(minimise){ setDesktopUI(minimise){
this.setDesktopLayout(minimise); this.setDesktopLayout(minimise);
this.manager.ops.enableOpsListPopovers(); this.manager.ops.enableOpsListPopovers();
// enable drag and drop
} }
@ -900,6 +900,7 @@ class App {
setMobileUI(){ setMobileUI(){
this.setMobileLayout(); this.setMobileLayout();
this.manager.ops.disableOpsListPopovers(); this.manager.ops.disableOpsListPopovers();
// disable drag and drop / long press and drag and drop for favourites
} }
} }

View file

@ -15,7 +15,6 @@
- test drag and drop etc. Regular mobile events / UX - test drag and drop etc. Regular mobile events / UX
- view-heights not correct due to variable taskbar on mobile devices - view-heights not correct due to variable taskbar on mobile devices
- minor issue w popovers glitching in modal ( edit favourites ), but it only occurs on (laptop) browser < breakpoint, not on a real mobile device. It's minor but bothers me
### Desktop UI: ### Desktop UI:
### General UI: ### General UI:

View file

@ -298,7 +298,9 @@ class OperationsWaiter {
this.removeIntent = false; this.removeIntent = false;
}.bind(this)); }.bind(this));
if (window.innerWidth >= this.app.breakpoint) {
$("#edit-favourites-list [data-toggle=popover]").popover(); $("#edit-favourites-list [data-toggle=popover]").popover();
}
$("#favourites-modal").modal(); $("#favourites-modal").modal();
} }