Repository: ionic-team/ionic-framework
File: core/src/components/modal/gestures/sheet.ts (TypeScript)

Code before:
     * When the backdrop is enabled, elements such
     * as inputs should not be focusable outside
     * the sheet.
     */
    baseEl.classList.remove(FOCUS_TRAP_DISABLE_CLASS);
  };

  const disableBackdrop = () => {
    baseEl.style.setProperty('pointer-events', 'none');
    backdropEl.style.setProperty('pointer-events', 'none');

    /**
     * When the backdrop is enabled, elements such
     * as inputs should not be focusable outside
     * the sheet.
     * Adding this class disables focus trapping
     * for the sheet temporarily.
     */
    baseEl.classList.add(FOCUS_TRAP_DISABLE_CLASS);
  };

  /**
   * Used when `expandToScroll` is disabled.
   * Changes the footer that is currently visible
   * @param footer - The footer to show
   */
  const swapFooterVisibility = (footer: 'original' | 'cloned') => {
    const originalFooter = baseEl.querySelector('ion-footer') as HTMLIonFooterElement | null;

    if (!originalFooter) {
      return;
    }

    const clonedFooter = wrapperEl.nextElementSibling as HTMLIonFooterElement;
    const footerToHide = footer === 'original' ? clonedFooter : originalFooter;
    const footerToShow = footer === 'original' ? originalFooter : clonedFooter;

    footerToShow.style.removeProperty('display');
    footerToShow.removeAttribute('aria-hidden');

    const page = baseEl.querySelector('.ion-page') as HTMLElement;
    if (footer === 'original') {
      page.style.removeProperty('padding-bottom');
    } else {
      const pagePadding = footerToShow.clientHeight;
      page.style.setProperty('padding-bottom', `${pagePadding}px`);
    }

    footerToHide.style.setProperty('display', 'none');
    footerToHide.setAttribute('aria-hidden', 'true');
  };

Review comment (suggestion):
```suggestion
  /**
   * Toggles the visible modal footer when `expandToScroll` is disabled.
   * @param footer The footer to show.
   */
```

Code after:
     * When the backdrop is enabled, elements such
     * as inputs should not be focusable outside
     * the sheet.
     */
    baseEl.classList.remove(FOCUS_TRAP_DISABLE_CLASS);
  };

  const disableBackdrop = () => {
    baseEl.style.setProperty('pointer-events', 'none');
    backdropEl.style.setProperty('pointer-events', 'none');

    /**
     * When the backdrop is enabled, elements such
     * as inputs should not be focusable outside
     * the sheet.
     * Adding this class disables focus trapping
     * for the sheet temporarily.
     */
    baseEl.classList.add(FOCUS_TRAP_DISABLE_CLASS);
  };

  /**
   * Toggles the visible modal footer when `expandToScroll` is disabled.
   * @param footer The footer to show.
   */
  const swapFooterVisibility = (footer: 'original' | 'cloned') => {
    const originalFooter = baseEl.querySelector('ion-footer') as HTMLIonFooterElement | null;

    if (!originalFooter) {
      return;
    }

    const clonedFooter = wrapperEl.nextElementSibling as HTMLIonFooterElement;
    const footerToHide = footer === 'original' ? clonedFooter : originalFooter;
    const footerToShow = footer === 'original' ? originalFooter : clonedFooter;

    footerToShow.style.removeProperty('display');
    footerToShow.removeAttribute('aria-hidden');

    const page = baseEl.querySelector('.ion-page') as HTMLElement;
    if (footer === 'original') {
      page.style.removeProperty('padding-bottom');
    } else {
      const pagePadding = footerToShow.clientHeight;
      page.style.setProperty('padding-bottom', `${pagePadding}px`);
    }

    footerToHide.style.setProperty('display', 'none');
    footerToHide.setAttribute('aria-hidden', 'true');
  };