Skip to content

Commit

Permalink
UI - enable scrolling back if not fullscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
thfries committed Nov 13, 2023
1 parent 91c747d commit c96cf84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/modules/utils/crudToolbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class CrudToolbar extends HTMLElement {
// toggle modal mode;
document.getElementById('modalCrudEdit').classList.toggle(CLASS_BG);
document.body.classList.toggle('modal-open');
document.body.style.overflow = this.isEditing ? 'hidden' : '';
document.body.style.overflow = this.isEditing && this.hasAttribute(ATTR_FULLSCREEN) ? 'hidden' : '';
this.dom.divRoot.classList.toggle(this.hasAttribute(ATTR_FULLSCREEN) ? CLASS_FG_FULLSCREEN : CLASS_FG);

// toggle button states;
Expand Down Expand Up @@ -171,6 +171,7 @@ class CrudToolbar extends HTMLElement {
this.toggleAttribute(ATTR_FULLSCREEN);
this.dom.buttonFullscreen.querySelector('.bi').classList.toggle(ICON_CLASS_FS);
this.dom.buttonFullscreen.querySelector('.bi').classList.toggle(ICON_CLASS_FS_EXIT);
document.body.style.overflow = this.isEditing && this.hasAttribute(ATTR_FULLSCREEN) ? 'hidden' : '';
if (this.dom.divRoot.classList.contains(CLASS_FG)) {
this.dom.divRoot.classList.replace(CLASS_FG, CLASS_FG_FULLSCREEN);
} else {
Expand Down

0 comments on commit c96cf84

Please sign in to comment.