Fix layout jumps/shifts and overflow on modals

This commit improves the user interface in modal display.

- Prevent layout shifts caused by background scrollbars when modals are
  active.
- Fix unintended overflow of modals on small screens, preventing parts
  of the modal from being cut off on the right side.
- Refactor DOM manipulation, enhancing modularity, reusability,
  extensibility, and separation of concerns.
- Centralize viewport test scenarios for different sizes in a single
  definition for E2E tests.
This commit is contained in:
undergroundwires
2023-11-19 23:51:25 +01:00
parent cb42f11b97
commit e299d40fa1
12 changed files with 772 additions and 165 deletions

View File

@@ -0,0 +1,19 @@
export interface ScrollDomStateAccessor {
bodyStyleOverflowX: string;
bodyStyleOverflowY: string;
htmlScrollLeft: number;
htmlScrollTop: number;
bodyStyleLeft: string;
bodyStyleTop: string;
bodyStylePosition: string;
bodyStyleWidth: string;
bodyStyleHeight: string;
readonly bodyComputedMarginLeft: string;
readonly bodyComputedMarginRight: string;
readonly bodyComputedMarginTop: string;
readonly bodyComputedMarginBottom: string;
readonly htmlScrollWidth: number;
readonly htmlScrollHeight: number;
readonly htmlClientWidth: number;
readonly htmlClientHeight: number;
}