You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$250] Safari - Error message text is not selectable #87337
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsWeeklyKSv2
Version Number: v9.3.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:#86271 Email or phone of affected tester (no customers): n/a Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Mac 15.4.1 Safari App Component: Chat Report View
Error message text ("Unexpected error posting the comment. Please try again later.") is selectable with click and drag. Blue selection highlight appears correctly.
Safari does not allow child user-select: text to override an ancestor's user-select: none (unlike Chrome/Firefox which do). The entire report action item is wrapped in a PressableWithSecondaryInteraction with accessibilityRole="button" (PureReportActionItem.tsx:2122), which causes BaseGenericPressable to unconditionally apply userSelectNone (BaseGenericPressable.tsx:195). The error text rendered by DotIndicatorMessage correctly sets userSelectText on the <Text> element (DotIndicatorMessage.tsx:110), but Safari ignores this child override when an ancestor has user-select: none.
What changes do you think we should make in order to solve the problem?
In PureReportActionItem, the error row rendered by OfflineWithFeedback (via ErrorMessageRow → MessagesRow → DotIndicatorMessage) should be moved outside the PressableWithSecondaryInteraction wrapper so it's no longer a descendant of the element with user-select: none. This avoids the Safari inheritance issue entirely without changing the broad GenericPressable behavior.
What alternative solutions did you explore? (Optional)
Remove userSelectNone from BaseGenericPressable when isRoleButton — Too broad an impact; would affect all button-role pressables across the app.
Add a Safari-specific CSS workaround (e.g., wrapping the error in an element that creates a new stacking context for user-select) — Fragile and browser-specific; restructuring the DOM is cleaner.
Supporting evidence
BaseGenericPressable.tsx:195: isRoleButton && styles.userSelectNone applies user-select: none + -webkit-user-select: none to the pressable container
BaseGenericPressable.tsx:52: isRoleButton is true when accessibilityRole or role is CONST.ROLE.BUTTON
PureReportActionItem.tsx:2122: Sets accessibilityRole={CONST.ROLE.BUTTON} on the PressableWithSecondaryInteraction
DotIndicatorMessage.tsx:110: Sets styles.userSelectText on error text, which Chrome/Firefox respect but Safari does not when an ancestor has user-select: none
styles/utils/userSelect/index.ts:8-11: userSelectNone includes both userSelect: 'none' and WebkitUserSelect: 'none'
Possibly related:#84639 — System/violation messages also cannot be selected or copied, likely the same root cause.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
Please re-state the problem that we are trying to solve in this issue.
Error message text rendered by DotIndicatorMessage (e.g. "Unexpected error posting the comment") is not text-selectable in Safari on macOS, even though it should be.
What is the root cause of that problem?
The guard in DotIndicatorMessage that decides whether to apply userSelectText or userSelectNone is:
On a MacBook with a Touch Bar or running macOS 13+, navigator.maxTouchPoints is reported as 5 by Safari (it was added by Apple to enable compatibility with pointer-events specs for Pencil/touch on iPad). This causes canUseTouchScreen() to return true, so isTextSelectable becomes false || !shouldUseNarrowLayout. On a wide layout that evaluates to true, but the check itself is fragile and unreliable for desktop-class browsers.
The deeper problem is that canUseTouchScreen() is being used as a proxy for "is this a pointer-only (desktop) environment where text selection makes sense", but it is not reliable for that purpose — especially in Safari where maxTouchPoints > 0 on any modern Mac.
What changes do you think we should make in order to solve the problem?
The error text in DotIndicatorMessage should always be selectable on web (non-native) platforms. The canUseTouchScreen guard exists to suppress accidental text selection on actual mobile touch UIs, but on web the correct signal is whether the user has a fine pointer (mouse/trackpad), not whether the device reports any touch capability.
The fix is to replace the canUseTouchScreen() condition with a hasHoverSupport() check (which tests (hover: hover) and (pointer: fine)), which is already available in the same DeviceCapabilities module and correctly returns false on touch-only devices and true on desktop browsers — including Safari on macOS:
-import {canUseTouchScreen} from '@libs/DeviceCapabilities';+import {hasHoverSupport} from '@libs/DeviceCapabilities';- const isTextSelectable = !canUseTouchScreen() || !shouldUseNarrowLayout;+ const isTextSelectable = hasHoverSupport();
hasHoverSupport() returns true when the primary pointing device can hover (i.e. a real mouse/trackpad), which is the correct signal for whether drag-to-select text should be enabled. The shouldUseNarrowLayout guard is unnecessary here because narrow layout on a desktop still has a pointer, and it was only adding confusion alongside the broken canUseTouchScreen check.
What alternative solutions did you explore? (Optional)
Please re-state the problem that we are trying to solve in this issue.
On Safari, users should be able to click and drag to select the inline error text shown under failed chat actions (for example, “Unexpected error posting the comment…”), but selection does not work.
What is the root cause of that problem?
The report action row is wrapped in PressableWithSecondaryInteraction with accessibilityRole={button}. In BaseGenericPressable, button-role pressables always apply styles.userSelectNone, which includes WebkitUserSelect: 'none'.
The error message is rendered as descendant text in DotIndicatorMessage, so Safari inherits the ancestor -webkit-user-select: none behavior for that content, which blocks drag selection.
I could not decode the attached MP4 in this unattended environment, so I am not claiming frame-by-frame visual verification.
What changes do you think we should make in order to solve the problem?
Keep the action row pressable behavior intact, but render the error message row outside the button-role pressable wrapper so it is no longer under userSelectNone.
Alternatively (if we want a smaller structural change), allow BaseGenericPressable to skip userSelectNone for this specific report-action case via an explicit prop, and enable text selection only for the error text subtree.
Verify Safari selection for error text with “Simulate failing network requests” enabled, and confirm no regression to context-menu/press interactions on the action row.
What alternative solutions did you explore? (Optional)
I considered changing selection heuristics in DotIndicatorMessage (for example, device capability checks), but the current code path here is dominated by the ancestor button-role userSelectNone, so fixing the container behavior is more direct and less brittle.
🚨 Edited by proposal-police: This proposal was edited at 2026-04-20 07:56:44 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
On Safari, users cannot select the inline error text shown under a failed chat action. That error text should be selectable with drag, double-click, and triple-click so it can be copied.
What is the root cause of that problem?
The error row is rendered inside the same button-like wrapper as the chat message row.
PureReportActionItem.tsx renders the full report action inside PressableWithSecondaryInteraction with accessibilityRole={CONST.ROLE.BUTTON}, and it passes the action errors into OfflineWithFeedback from inside that same pressable subtree.
OfflineWithFeedback.tsx then renders ErrorMessageRow as part of its own output, so the error text stays inside the button wrapper instead of being rendered outside it.
On Safari, text inside that button subtree is not selectable because it is still a descendant of the non-selectable pressable container. So the bug is not in the error text itself; the bug is that the error row is mounted in the wrong part of the tree.
What changes do you think we should make in order to solve the problem?
We should keep the existing message row structure intact, but stop OfflineWithFeedback from rendering its built-in error row inside the pressable subtree. Then we should render the same ErrorMessageRow as a sibling below PressableWithSecondaryInteraction.
This is different from the broader "move the error row outside the pressable" proposals because we do not need to move OfflineWithFeedback itself or restructure the full report-action layout. We can keep the existing wrapper hierarchy and only redirect the error-row render path.
reportActionErrors computes the error object once and reuses it.
shouldShowErrorMessages={false} prevents OfflineWithFeedback from rendering the error row inside the pressable subtree.
The sibling ErrorMessageRow reuses the same errors, styling, and dismiss callbacks, but renders outside the button wrapper, which makes the text selectable in Safari.
This is the smallest working structural fix because it only changes where the existing error row is rendered. It does not change shared pressable behavior, accessibility roles, or the main report-action content tree.
Video demo of the fix:
error-select-fix.mov
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
Alternative:
What changes do you think we should make in order to solve the problem?
We should keep the existing render structure and button semantics, and use the existing errorRowTextStyles path to apply a Safari-only text-selection override to this exact error row.
OfflineWithFeedback.tsx already accepts errorRowTextStyles and passes it through ErrorMessageRow -> MessagesRow -> DotIndicatorMessage, so we do not need to move the DOM or change shared pressable behavior.
⚠️@marufsharifi Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.
Error messages rendered in DotIndicatorMessage are placed inside a PressableWithSecondaryInteraction component that ultimately applies userSelectNone through BaseGenericPressable when accessibilityRole="button" is set.
Safari does not allow a child element with user-select: text to override an ancestor that has user-select: none. Because of this behavior, the error text becomes unselectable even though the text component itself intends to allow selection.
What changes do you think we should make?
Instead of restructuring the DOM or changing pressable behavior globally, we can explicitly override the selection behavior at the error message container level.
We can wrap the error message inside a container that forces text selection using Safari-compatible properties:
Then apply this style to the wrapper element around the error message in DotIndicatorMessage.
This ensures that Safari allows the error message text to be selected without modifying the existing pressable structure or affecting other button interactions.
What alternative solutions did you explore?
Other options include removing user-select: none from button pressables or moving the error message outside the pressable wrapper. However, both approaches introduce broader behavioral changes.
Applying a scoped style override keeps the fix minimal and avoids unintended regressions elsewhere in the app.
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsWeeklyKSv2
Activity
MelvinBot commentedon Apr 8, 2026
Proposal
What is the root cause of that problem?
Safari does not allow child
user-select: textto override an ancestor'suser-select: none(unlike Chrome/Firefox which do). The entire report action item is wrapped in aPressableWithSecondaryInteractionwithaccessibilityRole="button"(PureReportActionItem.tsx:2122), which causesBaseGenericPressableto unconditionally applyuserSelectNone(BaseGenericPressable.tsx:195). The error text rendered byDotIndicatorMessagecorrectly setsuserSelectTexton the<Text>element (DotIndicatorMessage.tsx:110), but Safari ignores this child override when an ancestor hasuser-select: none.What changes do you think we should make in order to solve the problem?
In
PureReportActionItem, the error row rendered byOfflineWithFeedback(viaErrorMessageRow→MessagesRow→DotIndicatorMessage) should be moved outside thePressableWithSecondaryInteractionwrapper so it's no longer a descendant of the element withuser-select: none. This avoids the Safari inheritance issue entirely without changing the broadGenericPressablebehavior.What alternative solutions did you explore? (Optional)
userSelectNonefromBaseGenericPressablewhenisRoleButton— Too broad an impact; would affect all button-role pressables across the app.user-select) — Fragile and browser-specific; restructuring the DOM is cleaner.Supporting evidence
BaseGenericPressable.tsx:195:isRoleButton && styles.userSelectNoneappliesuser-select: none+-webkit-user-select: noneto the pressable containerBaseGenericPressable.tsx:52:isRoleButtonis true whenaccessibilityRoleorroleisCONST.ROLE.BUTTONPureReportActionItem.tsx:2122: SetsaccessibilityRole={CONST.ROLE.BUTTON}on thePressableWithSecondaryInteractionDotIndicatorMessage.tsx:110: Setsstyles.userSelectTexton error text, which Chrome/Firefox respect but Safari does not when an ancestor hasuser-select: nonestyles/utils/userSelect/index.ts:8-11:userSelectNoneincludes bothuserSelect: 'none'andWebkitUserSelect: 'none'Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.MobileMage commentedon Apr 8, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Error message text rendered by
DotIndicatorMessage(e.g. "Unexpected error posting the comment") is not text-selectable in Safari on macOS, even though it should be.What is the root cause of that problem?
The guard in
DotIndicatorMessagethat decides whether to applyuserSelectTextoruserSelectNoneis:On a MacBook with a Touch Bar or running macOS 13+,
navigator.maxTouchPointsis reported as5by Safari (it was added by Apple to enable compatibility with pointer-events specs for Pencil/touch on iPad). This causescanUseTouchScreen()to returntrue, soisTextSelectablebecomesfalse || !shouldUseNarrowLayout. On a wide layout that evaluates totrue, but the check itself is fragile and unreliable for desktop-class browsers.The deeper problem is that
canUseTouchScreen()is being used as a proxy for "is this a pointer-only (desktop) environment where text selection makes sense", but it is not reliable for that purpose — especially in Safari wheremaxTouchPoints > 0on any modern Mac.App/src/components/DotIndicatorMessage.tsx
Line 89 in d1dbbcb
What changes do you think we should make in order to solve the problem?
The error text in
DotIndicatorMessageshould always be selectable on web (non-native) platforms. ThecanUseTouchScreenguard exists to suppress accidental text selection on actual mobile touch UIs, but on web the correct signal is whether the user has a fine pointer (mouse/trackpad), not whether the device reports any touch capability.The fix is to replace the
canUseTouchScreen()condition with ahasHoverSupport()check (which tests(hover: hover) and (pointer: fine)), which is already available in the sameDeviceCapabilitiesmodule and correctly returnsfalseon touch-only devices andtrueon desktop browsers — including Safari on macOS:App/src/components/DotIndicatorMessage.tsx
Lines 89 to 110 in d1dbbcb
hasHoverSupport()returnstruewhen the primary pointing device can hover (i.e. a real mouse/trackpad), which is the correct signal for whether drag-to-select text should be enabled. TheshouldUseNarrowLayoutguard is unnecessary here because narrow layout on a desktop still has a pointer, and it was only adding confusion alongside the brokencanUseTouchScreencheck.What alternative solutions did you explore? (Optional)
N/A
melvin-bot commentedon Apr 8, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (
External)melvin-bot commentedon Apr 8, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022041785352032178173
[-]Safari - Error message text is not selectable[/-][+][$250] Safari - Error message text is not selectable[/+]KJ21-ENG commentedon Apr 8, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
On Safari, users should be able to click and drag to select the inline error text shown under failed chat actions (for example, “Unexpected error posting the comment…”), but selection does not work.
What is the root cause of that problem?
The report action row is wrapped in
PressableWithSecondaryInteractionwithaccessibilityRole={button}. InBaseGenericPressable, button-role pressables always applystyles.userSelectNone, which includesWebkitUserSelect: 'none'.App/src/pages/inbox/report/PureReportActionItem.tsx
Lines 2033 to 2053 in 1d43910
App/src/components/Pressable/GenericPressable/implementation/BaseGenericPressable.tsx
Lines 51 to 52 in 1d43910
App/src/components/Pressable/GenericPressable/implementation/BaseGenericPressable.tsx
Lines 194 to 196 in 1d43910
App/src/styles/utils/userSelect/index.ts
Lines 8 to 10 in 1d43910
The error message is rendered as descendant text in
DotIndicatorMessage, so Safari inherits the ancestor-webkit-user-select: nonebehavior for that content, which blocks drag selection.App/src/components/DotIndicatorMessage.tsx
Lines 102 to 110 in 1d43910
I could not decode the attached MP4 in this unattended environment, so I am not claiming frame-by-frame visual verification.
What changes do you think we should make in order to solve the problem?
userSelectNone.BaseGenericPressableto skipuserSelectNonefor this specific report-action case via an explicit prop, and enable text selection only for the error text subtree.What alternative solutions did you explore? (Optional)
I considered changing selection heuristics in
DotIndicatorMessage(for example, device capability checks), but the current code path here is dominated by the ancestor button-roleuserSelectNone, so fixing the container behavior is more direct and less brittle.marufsharifi commentedon Apr 8, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-04-20 07:56:44 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
On Safari, users cannot select the inline error text shown under a failed chat action. That error text should be selectable with drag, double-click, and triple-click so it can be copied.
What is the root cause of that problem?
The error row is rendered inside the same button-like wrapper as the chat message row.
PureReportActionItem.tsxrenders the full report action insidePressableWithSecondaryInteractionwithaccessibilityRole={CONST.ROLE.BUTTON}, and it passes the action errors intoOfflineWithFeedbackfrom inside that same pressable subtree.App/src/pages/inbox/report/PureReportActionItem.tsx
Lines 2100 to 2170 in 01644db
OfflineWithFeedback.tsxthen rendersErrorMessageRowas part of its own output, so the error text stays inside the button wrapper instead of being rendered outside it.App/src/components/OfflineWithFeedback.tsx
Lines 141 to 168 in 01644db
On Safari, text inside that button subtree is not selectable because it is still a descendant of the non-selectable pressable container. So the bug is not in the error text itself; the bug is that the error row is mounted in the wrong part of the tree.
What changes do you think we should make in order to solve the problem?
We should keep the existing message row structure intact, but stop
OfflineWithFeedbackfrom rendering its built-in error row inside the pressable subtree. Then we should render the sameErrorMessageRowas a sibling belowPressableWithSecondaryInteraction.This is different from the broader "move the error row outside the pressable" proposals because we do not need to move
OfflineWithFeedbackitself or restructure the full report-action layout. We can keep the existing wrapper hierarchy and only redirect the error-row render path.The current report action code is here:
App/src/pages/inbox/report/PureReportActionItem.tsx
Lines 2100 to 2208 in 01644db
We should replace it with the following targeted changes in
PureReportActionItem.tsx.What this change does:
reportActionErrorscomputes the error object once and reuses it.shouldShowErrorMessages={false}preventsOfflineWithFeedbackfrom rendering the error row inside the pressable subtree.ErrorMessageRowreuses the sameerrors, styling, and dismiss callbacks, but renders outside the button wrapper, which makes the text selectable in Safari.This is the smallest working structural fix because it only changes where the existing error row is rendered. It does not change shared pressable behavior, accessibility roles, or the main report-action content tree.
Video demo of the fix:
error-select-fix.mov
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
Alternative:
What changes do you think we should make in order to solve the problem?
We should keep the existing render structure and button semantics, and use the existing
errorRowTextStylespath to apply a Safari-only text-selection override to this exact error row.OfflineWithFeedback.tsxalready acceptserrorRowTextStylesand passes it throughErrorMessageRow->MessagesRow->DotIndicatorMessage, so we do not need to move the DOM or change shared pressable behavior.App/src/components/OfflineWithFeedback.tsx
Lines 50 to 54 in 9317075
App/src/components/OfflineWithFeedback.tsx
Lines 160 to 167 in 9317075
App/src/components/ErrorMessageRow.tsx
Lines 33 to 41 in 9317075
App/src/components/MessagesRow.tsx
Lines 51 to 59 in 9317075
The current report-action code is here:
App/src/pages/inbox/report/PureReportActionItem.tsx
Lines 1685 to 1697 in 9317075
We should make these minimal changes:
This adds a dedicated style token for the Safari workaround.
This keeps normal behavior unchanged and adds the Safari-specific
WebkitUserSelect: 'all'override in one place.This scopes the workaround to the exact failing row on Safari only. It is stronger than the other approaches here because:
github-actions commentedon Apr 8, 2026
JasimMalook commentedon Apr 8, 2026
Proposal
What is the root cause of the problem?
Error messages rendered in
DotIndicatorMessageare placed inside aPressableWithSecondaryInteractioncomponent that ultimately appliesuserSelectNonethroughBaseGenericPressablewhenaccessibilityRole="button"is set.Safari does not allow a child element with
user-select: textto override an ancestor that hasuser-select: none. Because of this behavior, the error text becomes unselectable even though the text component itself intends to allow selection.What changes do you think we should make?
Instead of restructuring the DOM or changing pressable behavior globally, we can explicitly override the selection behavior at the error message container level.
We can wrap the error message inside a container that forces text selection using Safari-compatible properties:
Then apply this style to the wrapper element around the error message in
DotIndicatorMessage.This ensures that Safari allows the error message text to be selected without modifying the existing pressable structure or affecting other button interactions.
What alternative solutions did you explore?
Other options include removing
user-select: nonefrom button pressables or moving the error message outside the pressable wrapper. However, both approaches introduce broader behavioral changes.Applying a scoped style override keeps the fix minimal and avoids unintended regressions elsewhere in the app.
33 remaining items
melvin-bot commentedon May 6, 2026
This issue has not been updated in over 14 days. @parasharrajat eroding to Weekly issue.
marufsharifi commentedon May 13, 2026
@parasharrajat friendly bump
parasharrajat commentedon May 13, 2026
@marufsharifi With safari workaround. Would it select all text? How would the
WebkitUserSelect: 'all'work?marufsharifi commentedon May 13, 2026
parasharrajat commentedon May 13, 2026
By checking all proposals in order, @marufsharifi's comes first with the correct approach. Let's render the error outside..
🎀 👀 🎀 C+ reviewed
melvin-bot commentedon May 13, 2026
Triggered auto assignment to @iwiznia, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
melvin-bot commentedon May 13, 2026
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
marufsharifi commentedon May 15, 2026
@iwiznia, waiting to be assigned. thanks.
iwiznia commentedon May 15, 2026
I don't think this problem is worth solving