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

Code before:
      if (contentAnimation) {
        /**
         * The modal content should scroll at any breakpoint when expandToScroll
         * is disabled. In order to do this, the content needs to be completely
         * viewable so scrolling can access everything. Othewise, the default
         * behavior would show the content off the screen and only allow
         * scrolling when the sheet is fully expanded.
         */
        contentAnimation.keyframes([
          { offset: 0, maxHeight: `${(1 - breakpointOffset) * 100}%` },
          { offset: 1, maxHeight: `${snapToBreakpoint * 100}%` },
        ]);
      }

      animation.progressStep(0);
    }

    /**
     * Gesture should remain disabled until the
     * snapping animation completes.
     */
    gesture.enable(false);

    /**
     * If expandToScroll is disabled, we need to swap
     * the visibility to the cloned one so the footer
     * doesn't flicker when the sheet's height is animated.
     */
    if (!expandToScroll && shouldRemainOpen) {
      swapFooterVisibility('cloned');
    }

    if (shouldPreventDismiss) {
      handleCanDismiss(baseEl, animation);
    } else if (!shouldRemainOpen) {
      onDismiss();
    }

    /**
     * If the sheet is going to be fully expanded or if the sheet has toggled
     * to scroll at any breakpoint then we should enable scrolling immediately.
     * then we should enable scrolling immediately. The sheet modal animation
     * takes ~500ms to finish so if we wait until then there is a visible delay
     * for when scrolling is re-enabled. Native iOS allows for scrolling on the
     * sheet modal as soon as the gesture is released, so we align with that.
     */
    if (contentEl && (snapToBreakpoint === breakpoints[breakpoints.length - 1] || !expandToScroll)) {
      contentEl.scrollY = true;
    }

    return new Promise<void>((resolve) => {

Review comment (suggestion):
```suggestion
     * the footer visibility to the cloned one so the footer
```

Code after:
        /**
         * The modal content should scroll at any breakpoint when expandToScroll
         * is disabled. In order to do this, the content needs to be completely
         * viewable so scrolling can access everything. Otherwise, the default
         * behavior would show the content off the screen and only allow
         * scrolling when the sheet is fully expanded.
         */
        contentAnimation.keyframes([
          { offset: 0, maxHeight: `${(1 - breakpointOffset) * 100}%` },
          { offset: 1, maxHeight: `${snapToBreakpoint * 100}%` },
        ]);
      }

      animation.progressStep(0);
    }

    /**
     * Gesture should remain disabled until the
     * snapping animation completes.
     */
    gesture.enable(false);

    /**
     * If expandToScroll is disabled, we need to swap
     * the footer visibility to the cloned one so the footer
     * doesn't flicker when the sheet's height is animated.
     */
    if (!expandToScroll && shouldRemainOpen) {
      swapFooterVisibility('cloned');
    }

    if (shouldPreventDismiss) {
      handleCanDismiss(baseEl, animation);
    } else if (!shouldRemainOpen) {
      onDismiss();
    }

    /**
     * Enables scrolling immediately if the sheet is about to fully expand
     * or if it allows scrolling at any breakpoint. Without this, there would
     * be a ~500ms delay while the modal animation completes, causing a
     * noticeable lag. Native iOS allows scrolling as soon as the gesture is
     * released, so we align with that behavior.
     */
    if (contentEl && (snapToBreakpoint === breakpoints[breakpoints.length - 1] || !expandToScroll)) {
      contentEl.scrollY = true;
    }

    return new Promise<void>((resolve) => {
      animation
        .onFinish(