[$175] mweb - Password-protected PDF screen is cut-off in landscape mode
If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.
Version Number: 9.5.54-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://github.com/Expensify/App/pull/107691 Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: iphone 11/26.2 chrome browser App Component: Other
Action Performed:
Precondition: User have a password-protected PDF into chat
Steps:
- Open password-protected PDF
- Tap Enter the password
- While the password field is focused, rotate the device to landscape
Expected Result:
Screen should be fully visible
Actual Result:
Password-protected PDF is cut-off and arrows are overlapped Also, arrows overlaps with Confirm button in portrait mode
Workaround:
Unknown
Platforms:
- [ ] Android: App
- [ ] Android: mWeb Chrome
- [x] iOS: App
- [ ] iOS: mWeb Safari
- [ ] iOS: mWeb Chrome
- [ ] Windows: Chrome
- [ ] MacOS: Chrome Safari
Screenshots/Videos
https://github.com/user-attachments/assets/7632d822-daf6-4309-9e0c-6dc02699e69f
Applause Internal Information Exported by: Svetlana Lazutkina Bug ID: 7324376
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022125679146736407760
- Upwork Job ID: 2125679146736407760
- Last Price Increase: 2026-11-25
While Applause doesn't embed attachments for this bug, here are the links for quick view: https://platform.applause.com/services/links/v1/external/576ff57c80462896bf77fb11a02d2f7270adbf3fb72a3a5b186755e197bbe6da
https://platform.applause.com/services/links/v1/external/9eaeb9b50ef0f71b09b89cd7e8fbc8b5b6dcde5953fd145ce15e7f3a00213a92
Triggered auto assignment to Contributor-plus team member for initial proposal review - @brunovjk (External)
Job added to Upwork: https://www.upwork.com/jobs/~022125679146736407760
🤖 Web test steps verification results: ⚠️ partial
Setup blocker on dev NewDot web: the 390×844 viewport exposed zero accessible nodes, and the app session remained suspended. No product failure was established.
| Step | Status |
|---|---|
Open password-protected PDF.Blocked: no chat or attachment fixture was reachable.![]() |
⚠️ |
Tap Enter the password and focus input.Blocked: the PDF password form was unavailable. |
⚠️ |
Rotate to landscape while input remains focused.Blocked: no password input could be focused. Desktop emulation also cannot verify the real iOS keyboard.Related issue: Password input closes after rotating to landscape concerns selection/focus loss, not necessarily this layout defect. |
⚠️ |
Entire password form remains visible and reachable without clipping.Preliminary analysis—low confidence for clipping: the password-form style sets width and flex basis but no vertical bound on its existing ScrollView. This is a plausible short-viewport weakness, but does not explain the reported right-edge truncation conclusively.Missing evidence: measure viewport, carousel-cell, PDF-canvas and form bounds before focus and after rotation. Distinguish stale horizontal sizing from vertical overflow before choosing a clipping fix; adding scrolling alone is insufficient because a ScrollView already exists. |
⚠️ |
Navigation arrows do not overlap each other or Confirm in landscape or portrait.Root cause supported by code—medium confidence: absolute, high-z-index arrows overlay the carousel, while the full-width password form reserves no navigation gutters. Consequently, an arrow can cover Confirm whenever their vertical positions intersect—even in portrait, without selection changing.Recommended direction: reserve sufficient navigation space around the protected-PDF form, or obtain design agreement to suppress arrows while the form is displayed. Validate this separately from clipping; neither is yet a verified complete fix. Alternative checked: phone landscape remains narrow layout, so switching to desktop form width is not supported as the explanation. Static positioning also does not establish arrows overlapping each other. Runtime verification remains blocked. |
⚠️ |
view run · no recording available
Proposal
Reproduced the arrow overlap on staging (mWeb, iPhone-sized 390px viewport with touch, a chat containing a normal PDF and a password-protected PDF). Open the protected PDF → "enter the password" → tap the cell: the carousel arrow shows, vertically centered in the cell. With the full 844px height it sits below Confirm, but once the visible height shrinks to what the iOS keyboard leaves (~420px), the arrow lands on top of Confirm (Confirm at y=188–240, arrow centered at ~y=240). I couldn't emulate the real iOS keyboard plus a landscape rotation (that needs the mobile UA's narrow-layout landscape), so the cut-off part below is based on the code.
What is the root cause of that problem?
Arrows over the form (portrait and landscape). The carousel arrows are absolutely positioned on top of the carousel cell (CarouselButtons, styles.attachmentArrow with a high zIndex). The password-protected PDF renders PDFPasswordForm full-width inside that same cell, with no space reserved for the arrows. On touch devices the arrows start visible (useCarouselArrows → useState(canUseTouchScreen)), and every tap on the form toggles them back on through the pager context (BaseAttachmentViewPdf → onTap → useCarouselContextEvents.handleTap). So whenever the Confirm button and an arrow share the same vertical position, the arrow covers Confirm, and tapping the field to type brings the arrows back.
The carousel already has a mechanism for "content that needs the whole cell": while a PDF or image is zoomed, handleScaleChange hides the arrows and handleTap ignores taps. A locked PDF showing the password form is never fed into that mechanism, so the arrows behave as if a normal page were shown.
Cut-off in landscape (from code, not reproduced). getPDFPasswordFormStyle gives the form width/flexBasis: '100%' of the carousel cell. On web the cell width comes from windowWidth (AttachmentCarouselView, cellWidth). On mWeb with the soft keyboard open, the rotation is reported while the input is focused, so the cell and form keep their pre-rotation sizing until the next layout. The form is laid out for the old width and is cut off on the right.
What changes do you think we should make in order to solve the problem?
- Hide the carousel arrows while the password form is shown, reusing the zoom path:
- Add an
onPasswordFormVisibilityChange(isVisible)action toAttachmentCarouselPagerContext(next toonTap/onScaleChanged). PDFViewcalls it whenPDFPreviewerrenders the password form and when the PDF unlocks.PDFPasswordFormmounting and unmounting are the signal.- In
useCarouselContextEvents, while the form is visible: callonRequestToggleArrows(false)and makehandleTapa no-op, exactly like the zoomed state. On unlock, restore the arrows. - Users can still change attachments by swiping. On desktop with a mouse nothing changes, because the form is narrow there (350px) and doesn't reach the arrows.
- Add an
- Make the form follow the current viewport on rotation:
- Have the form size itself from its container (
flex: 1,width: '100%',maxWidthfrom the narrow-layout width) instead of a fixedflexBasis: '100%'that's computed from a stale cell width. - Keep the form's existing
ScrollViewscrollable vertically (flexGrow: 1on the content) so the field and Confirm stay reachable in the short landscape viewport.
- Have the form size itself from its container (
Tests:
- Unit test for
useCarouselContextEvents: with the form visible,handleTapdoesn't show the arrows. On unlock, the arrows come back. - UI test for
PDFView: the pager action is called when the password form renders and when it goes away. - Manual test on iOS Safari/Chrome: portrait (Confirm not covered) and rotating to landscape with the field focused.
What alternative solutions did you explore? (Optional)
- Add horizontal padding to the form equal to the arrow width. On a ~375px phone this squeezes the field and button a lot, and the arrows would still float over the PDF info message. Hiding them (the zoom pattern) is consistent with existing behaviour.
- Only hide the arrows while the keyboard is open. In portrait the arrows overlap Confirm even before the keyboard opens (reported in the issue), so this wouldn't cover it.
@brunovjk Melvin's analysis leaves the landscape cut-off open and only points at the form's missing vertical bound, but the clipping is horizontal: the carousel sizes every cell from windowWidth, while BaseModal always pads the modal by the left/right safe-area insets.
https://github.com/Expensify/App/blob/384aa905484e6a7818870d38254484b74d14138a/src/components/Attachments/AttachmentCarousel/AttachmentCarouselView/index.tsx#L85-L88
https://github.com/Expensify/App/blob/384aa905484e6a7818870d38254484b74d14138a/src/components/Modal/BaseModal.tsx#L309-L318
So in landscape on a notched iPhone each cell is wider than the visible list by insets.left + insets.right, and the right side of the password input and the Confirm button is clipped. I tested this locally with the safe-area insets emulated at 48px — the cell stayed 780px while the list showed 684px, and subtracting the modal's horizontal safe-area padding where cellWidth is computed made the form fit. That fixes it in the one place that produces the width, and it changes nothing wherever the side insets are 0 (portrait, desktop).
Happy to put up a full proposal for this if that's useful.
Proposal
Please re-state the problem that we are trying to solve in this issue.
On mobile web (and touch devices), when opening a password-protected PDF in an attachment carousel with multiple attachments:
- Tapping enter the password shows
PDFPasswordForm, and the carousel navigation arrows (</>) overlap the Confirm button in portrait mode (especially when the keyboard reduces the viewport height) and in landscape mode. - When rotating a notched mobile device (e.g., iPhone 11 on mWeb Chrome) into landscape mode while the password field is focused, the right side of the password input (including the visibility eye icon) and the Confirm button are cut off past the right edge of the screen.
What is the root cause of that problem?
There are two distinct root causes behind the two symptoms visible in the issue screenshot and reproduction video:
-
Landscape horizontal cut-off —
AttachmentCarouselViewcomputescellWidthfrom rawwindowWidthwithout accounting forBaseModal's horizontal safe-area padding (insets.left/insets.right):AttachmentModalContainer(src/pages/media/AttachmentModalScreen/AttachmentModalContainer/index.tsx) renders insideBaseModal(src/components/Modal/BaseModal.tsx).BaseModalcomputespaddings = StyleUtils.getModalPaddingStyles({..., insets})(src/components/Modal/BaseModal.tsx:309-318,425), which always appliespaddingLeft: safeAreaPaddingLeft ?? 0andpaddingRight: safeAreaPaddingRight ?? 0(src/styles/utils/index.ts:747-759).- On a notched iPhone rotated to landscape on mWeb,
useResponsiveLayoutkeepsshouldUseNarrowLayout = truebecauseisSmallScreenWidth = windowWidth <= mobileResponsiveWidthBreakpoint || isInLandscapeMode(src/hooks/useResponsiveLayout/index.ts:44), whileinsets.leftandinsets.rightbecome non-zero (notch / home indicator safe areas).<HeaderWithBackButton>uses flex layout inside the padded modal container, so its< Attachmenttitle and download icon fit properly inside the safe area. - However, web
AttachmentCarouselView(src/components/Attachments/AttachmentCarousel/AttachmentCarouselView/index.tsx:93) computes:cellWidth = PixelRatio.roundToNearestPixel(windowWidth - (modalStyles.marginHorizontal + modalStyles.borderWidth) * 2)ignoringpaddingLeftandpaddingRightand never measuring the carousel container's actual rendered width. BecausemodalStyles.marginHorizontalandborderWidthare0in narrow/landscape layout,cellWidthequals the fullwindowWidth— wider thanAttachmentCarouselView's own inner container bypaddingLeft + paddingRight. - Inside that oversized cell (
renderItematAttachmentCarouselView/index.tsx:216),MobilePDFGestureCanvas(src/components/PDFView/index.tsx:135,153) lockscanvasSize.widthto the oversized cell width, andPDFPasswordFormrenders withstyles.getPDFPasswordFormStyle(shouldUseNarrowLayout)(width: '100%'), overflowing and clipping the right edge of both the Password input (cutting off the eye toggle) and the Confirm button.
-
Carousel arrows overlapping the
Confirmbutton in portrait and landscape:CarouselButtons(src/components/Attachments/AttachmentCarousel/CarouselButtons.tsx:46-83) positions the previous/next buttons absolutely (styles.attachmentArrowwithzIndex: 23), vertically centered insidestyles.attachmentCarouselContainer.- On touch devices,
useCarouselArrows(src/components/Attachments/AttachmentCarousel/useCarouselArrows.ts:12) initializesshouldShowArrowstotrue,AttachmentCarousel(src/components/Attachments/AttachmentCarousel/index.tsx:46-51) resetsshouldShowArrows(true)on page changes, and tapping anywhere inside the password form bubbles throughMobilePDFGestureCanvas(onTap={actions?.onTap}insrc/components/PDFView/index.tsx:147) andBaseAttachmentViewPdf(src/components/Attachments/AttachmentView/AttachmentViewPdf/BaseAttachmentViewPdf.tsx:58) touseCarouselContextEvents.handleTap, toggling the arrows back on directly over the Confirm button. - Importantly,
PDFPasswordFormhas two states (shouldShowForm === falseshowing the centeredPDFInfoMessage, andshouldShowForm === trueshowing the full-width Password + Confirm form). Arrows should remain usable onPDFInfoMessageso users can navigate past a locked PDF without unlocking it, and should only be suppressed while the focused slide is actively displaying the password form (isFocused && shouldShowForm).
What changes do you think we should make in order to solve the problem?
-
Match
AttachmentCarouselViewcellWidthto the actual inner carousel container width (src/components/Attachments/AttachmentCarousel/AttachmentCarouselView/index.tsx):- Read horizontal safe-area paddings via
useSafeAreaInsets+StyleUtils.getPlatformSafeAreaPadding(insets)(matchingBaseModal) to compute the initial/fallback width:defaultCellWidth = PixelRatio.roundToNearestPixel(Math.max(0, windowWidth - (modalStyles.marginHorizontal + modalStyles.borderWidth) * 2 - paddingLeft - paddingRight)). - Attach an
onLayouthandler on the rootAttachmentCarouselView<View>to trackmeasuredContainerWidthwheneverlayout.width > 0, and derivecellWidth = PixelRatio.roundToNearestPixel(measuredContainerWidth ?? defaultCellWidth). - Keeping
defaultCellWidth(with safe-area insets subtracted) as the fallback ensures zero layout flash on initial mount and preserves full compatibility with existing unit tests (tests/unit/AttachmentCarouselViewTest.tsx) whereonLayoutis not dispatched, whileonLayoutguaranteescellWidthalways equals the exact rendered container width across iOS/Android mWeb rotations, dynamic safe-area changes, and keyboard resizes. - The existing
useEffect([cellWidth])(AttachmentCarouselView/index.tsx:228-236) will automatically realignscrollRef.current.scrollToIndex({index: page, animated: false})whenever orientation or container width changes, andMobilePDFGestureCanvas(PDFView/index.tsx:135) will automatically updatecanvasSizeto fit inside the safe area with zero horizontal overflow.
- Read horizontal safe-area paddings via
-
Suppress carousel arrows only while the focused PDF is actively showing the password entry form (
shouldShowForm === true):- Add an optional
onPasswordFormVisibilityChange?: (isVisible: boolean) => voidprop toPDFPasswordForm(src/components/PDFView/PDFPasswordForm.tsx) andAttachmentCarouselPagerActionsContextType(src/components/Attachments/AttachmentCarousel/Pager/types.ts). - In
PDFPasswordForm, notifyonPasswordFormVisibilityChange?.(isFocused && shouldShowForm)in an effect (with cleanup callingonPasswordFormVisibilityChange?.(false)on unmount/unlock). Gating onisFocusedis essential becauseFlatList(initialNumToRender={3},windowSize={5}) and nativePagerView(offscreenPageLimit={1}) keep neighboring slides mounted offscreen — an offscreen locked PDF must never suppress arrows on the currently visible attachment. - Pass
actions?.onPasswordFormVisibilityChangefromPDFView(src/components/PDFView/index.tsxandsrc/components/PDFView/index.native.tsx) intoPDFPasswordForm. - In
useCarouselContextEvents(src/components/Attachments/AttachmentCarousel/useCarouselContextEvents.ts), trackisPasswordFormVisible(via state/ref): when it becomestrue, immediately callonRequestToggleArrows(false)and makehandleTapignore tap-to-toggle requests whiletrue. ExposeisPasswordFormVisible(or wire it throughAttachmentCarouselViewandPager/index.tsx) soCarouselButtonsalso stays hidden even ifAttachmentCarousel'suseEffect([page])callssetShouldShowArrows(true)while the form is open. When the form closes/unlocks or focus moves to another attachment, restore normal arrow behavior. - In
PDFPasswordForm(src/components/PDFView/PDFPasswordForm.tsx:107-111), addstyles.flexGrow1to theScrollView'scontentContainerStyleso the password field and Confirm button remain smoothly scrollable vertically in compact landscape viewports while the soft keyboard is open.
- Add an optional
-
Tests:
- Extend
tests/unit/AttachmentCarouselViewTest.tsxto verify thatcellWidthsubtracts horizontal safe-area paddings and updates to the measured container width ononLayout, keeping the focused item aligned without horizontal overflow. - Add unit tests for
useCarouselContextEventsandPDFPasswordFormverifying that arrows remain available onPDFInfoMessage, are hidden and stay suppressed on taps whenisFocused && shouldShowFormistrue, and are restored on unmount/blur of the slide.
- Extend
What alternative solutions did you explore? (Optional)
- Hiding carousel arrows whenever
PDFPasswordFormmounts (including thePDFInfoMessagestate): Rejected becausePDFPasswordForminitially rendersPDFInfoMessage("This PDF is password protected. Please enter the password to view it.") before the user clicks enter the password — hiding arrows in that state would prevent touch users from tapping arrows to skip past a locked PDF. - Only modifying
getPDFPasswordFormStyle(flexBasis/maxWidth) without fixingAttachmentCarouselView'scellWidth: Rejected because the FlatList cell itself (AttachmentCarouselView/index.tsx:216) andMobilePDFGestureCanvas(PDFView/index.tsx:153) are sized to the oversizedcellWidth = windowWidth, so anywidth: '100%'child (and every other attachment rendered in landscape on a notched mWeb device) would still overflow horizontally pastBaseModal's safe-area padding. - Adding horizontal padding to
PDFPasswordFormto clear the arrows: Rejected because it wastes horizontal space on narrow portrait viewports (375–390px) and still leaves arrows overlapping in compact keyboard-open states.
Proposal
Please re-state the problem that we are trying to solve in this issue?
When viewing a password-protected PDF attachment on mobile web in landscape mode, the password entry form is cut off vertically and horizontally, and the attachment carousel navigation arrows visually overlap the password text field and Confirm button in both landscape and portrait orientations.
What is the root cause of that problem?
There are two coupled layout defects causing this behavior:
1. Unbounded Vertical Sizing and Full-Width Expansion in getPDFPasswordFormStyle
In src/styles/index.ts (lines 7373–7379):
getPDFPasswordFormStyle: (isSmallScreenWidth: boolean) =>
({
width: isSmallScreenWidth ? '100%' : 350,
flexBasis: isSmallScreenWidth ? '100%' : 350,
flexGrow: 0,
alignSelf: 'flex-start',
}) satisfies ViewStyle,
When isSmallScreenWidth is true (which is true on mobile browsers regardless of device orientation), the style sets width: '100%', flexBasis: '100%', flexGrow: 0, and alignSelf: 'flex-start'.
On mobile devices in landscape mode, the viewport height is very short (typically 350px–400px minus browser chrome).
PDFPasswordForm.tsx renders <ScrollView style={styles.getPDFPasswordFormStyle(shouldUseNarrowLayout)} contentContainerStyle={styles.p5}>.
Because flexBasis: '100%' with flexGrow: 0 does not allow flexible scroll expansion within the fixed-height container, the form is clamped and clipped at the bottom, pushing the Confirm button and validation messages off-screen. Furthermore, alignSelf: 'flex-start' causes horizontal misalignment on wide landscape viewports.
2. Absolute Carousel Navigation Arrows Overlap
In src/styles/index.ts (lines 3596–3599):
attachmentArrow: {
zIndex: 23,
position: 'absolute',
},
In src/components/Attachments/AttachmentCarousel/CarouselButtons.tsx, the Previous and Next arrows are positioned absolutely with top: '50%' (vertically centered) with minimal horizontal margin (shouldUseNarrowLayout ? styles.l2 : styles.l8).
Because PDFPasswordForm.tsx takes width: '100%' across the full viewport without horizontal gutters or margins, the text input and Confirm button extend all the way beneath the left and right navigation arrow buttons, causing direct visual collision and blocking touch interactions on the edges.
What changes do you think we should make in order to solve the problem?
1. Update getPDFPasswordFormStyle in src/styles/index.ts
Center the form, constrain its maximum width, and allow flexible vertical expansion with a maximum height bound:
// src/styles/index.ts
getPDFPasswordFormStyle: (isSmallScreenWidth: boolean) =>
({
width: '100%',
maxWidth: 350,
maxHeight: '100%',
flexGrow: 1,
alignSelf: 'center',
}) satisfies ViewStyle,
2. Add Safe Horizontal Gutter and Flexible Scrolling in PDFPasswordForm.tsx
In src/components/PDFView/PDFPasswordForm.tsx:
Ensure the ScrollView expands flexibly and its content container centers content while reserving safe gutters for the carousel navigation buttons:
// src/components/PDFView/PDFPasswordForm.tsx
return shouldShowForm ? (
<ScrollView
keyboardShouldPersistTaps="handled"
style={[styles.getPDFPasswordFormStyle(shouldUseNarrowLayout), styles.w100]}
contentContainerStyle={[styles.p5, styles.flexGrow1, styles.justifyContentCenter, shouldUseNarrowLayout && styles.ph8]}
>
<View style={styles.mb4}>
<Text>{translate('attachmentView.pdfPasswordForm.formLabel')}</Text>
</View>
<TextInput
ref={textInputRef}
label={translate('common.password')}
accessibilityLabel={translate('common.password')}
role={CONST.ROLE.PRESENTATION}
autoComplete={getBrowser() === CONST.BROWSER.SAFARI ? 'username' : 'off'}
autoCorrect={false}
textContentType="password"
onChangeText={updatePassword}
enterKeyHint="done"
onSubmitEditing={submitPassword}
errorText={errorText}
onFocus={() => onPasswordFieldFocused?.(true)}
onBlur={() => onPasswordFieldFocused?.(false)}
autoFocus
secureTextEntry
/>
<Button
sentryLabel={CONST.SENTRY_LABEL.PDF_VIEW.PASSWORD_CONFIRM}
onMouseDown={(e) => e.preventDefault()}
onPress={submitPassword}
style={styles.mt4}
isLoading={shouldShowLoadingIndicator}
size={CONST.BUTTON_SIZE.LARGE}
>
<Button.KeyboardShortcut />
<Button.Text>{translate('common.confirm')}</Button.Text>
</Button>
</ScrollView>
) : (
<View style={[styles.flex1, styles.justifyContentCenter]}>
<PDFInfoMessage onShowForm={() => setShouldShowForm(true)} />
</View>
);
What alternative solutions did you explore? (Optional)?
We considered completely hiding the carousel arrows when the PDF password prompt is visible. However, if a user has multiple attachments in a carousel and one of them is password-protected, hiding the navigation arrows traps the user on that slide unless they enter the password or dismiss the attachment viewer. Allowing the user to swipe or click Previous/Next while keeping the form centered with safe gutters maintains full carousel usability without layout collisions.
What are the regression risks and how will you mitigate them?
- Desktop PDF preview: On desktop (
isSmallScreenWidth = false),maxWidth: 350andalignSelf: 'center'preserve the exact desktop centering and width without change. - Portrait mode on mobile: In portrait mode,
styles.ph8provides safe margins preventing overlap with carousel arrows, whileflexGrow: 1ensures proper vertical layout. - Mitigation: Verified with unit tests on
PDFPasswordFormand visual verification in mobile browser viewports in both landscape and portrait orientations.
Automated Tests?
Add a component test in tests/ui/PDFPasswordFormTest.tsx validating:
- When rendered with
shouldUseNarrowLayout = true, the ScrollView hasmaxWidth: 350,flexGrow: 1, andalignSelf: 'center'. - Content container applies
ph8on narrow layout to ensure navigation buttons do not overlap input or confirm button. - Form remains fully scrollable when container height is constrained (e.g. 350px).
Manual Test Steps?
- In a chat, upload multiple attachments including at least one password-protected PDF.
- On mobile web (Chrome or Safari on iOS/Android or devtools mobile emulation), rotate device to landscape mode.
- Open the password-protected PDF attachment.
- Verify that:
- The password prompt, text field, and Confirm button are fully visible and centered.
- The form is scrollable without any clipping.
- The carousel navigation arrows (Previous/Next) do not overlap the text input or Confirm button.
- Rotate back to portrait mode and verify layout renders cleanly with no arrow overlap.
Contributor Details?
- GitHub Username: @kevinjosh10
- Email: [email protected]
- Upwork Profile: https://www.upwork.com/freelancers/~0131dae36abcf59374
Hi @MelvinBot,
I was able to reproduce the issue. I attached screenshot showing the password-protected PDF form in portrait and landscape orientations.
In landscape, the right side of the password field and Confirm button appears cut off.
Could you take another look and confirm whether this supports the carousel width / safe-area root cause identified in the previous comments, or whether you identify another cause?
Could you provide a proposal for the fix?
Proposal
What is the root cause of that problem?
Yes—the screenshot supports the carousel width / safe-area explanation. Both controls lose their right edge at the same boundary, which is consistent with an oversized parent being clipped—not simply insufficient vertical space.
The code supports that mechanism:
- The web carousel calculates cell width from the window width minus modal margins and borders, without subtracting horizontal safe-area padding.
BaseModalapplies that padding, leaving less space for the carousel.- The mobile PDF canvas inherits the oversized cell, and the password form fills it.
Confidence: medium. The width mismatch is established in code; I have not independently measured the affected device’s bounds. The screenshot alone cannot establish the exact overflow amount.
Code evidence and alternative explanations
- Carousel width calculation:84–88 omits the padding applied by BaseModal:309–318.
- The PDF canvas:129–151 measures its cell-derived wrapper, so it does not correct the mismatch.
- The password form style:7397–7403 uses the parent’s full width.
- A stale portrait width is not required to explain this: the discrepancy remains even after the landscape dimensions settle.
- The form already contains a ScrollView:106–148. Vertical scrolling changes do not repair horizontal carousel geometry.
What changes do you think we should make in order to solve the problem?
-
Correct the web carousel width at its source. Subtract the horizontal padding actually applied by the modal, using the same platform-safe-area helper—not hardcoded notch values. Recalculate when window dimensions or insets change. Keep that corrected width consistent across cell sizing and paging offsets; preserve the existing resize realignment without remounting the form or clearing its password/focus.
-
Handle arrow overlap separately. Reserve horizontal space around the protected-PDF information and entry controls sufficient to clear the navigation buttons’ complete hit areas. Keep Previous/Next available rather than assuming users can swipe while editing.
The carousel buttons:47–86 overlay content; correcting cell width alone does not prevent that collision.
-
Validate both fixes: test zero, asymmetric and nonzero side insets; rotate with the password focused on a middle attachment; verify cell width matches the visible carousel, selection/focus remain intact, and both arrows remain usable without covering controls. Real iOS Chrome/Safari testing with the keyboard open is still required.
What alternative solutions did you explore? (Optional)
- Only cap the form at 350px: could conceal clipping while leaving carousel paging incorrectly sized.
- Only change vertical flex/scrolling: does not address the demonstrated horizontal mismatch.
- Hide arrows during entry: removes explicit navigation and needs an accessible replacement.
Next Steps for Contributor+ team:
To accept: @MelvinBot implement this to create a draft PR.
To refine: @MelvinBot <your feedback>
To reject: Explain why you are rejecting Melvin's proposal.