Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐴] Don't submit the message on return press when on a phone (web input) #4203

Merged
merged 1 commit into from
May 24, 2024

Conversation

haileyok
Copy link
Contributor

@haileyok haileyok commented May 23, 2024

We want to keep parity on mobile web with the native app, so we should not submit messages when the return key gets pressed.

It would be nice if we could do the same for tablets, but this is complicated by the fact that these devices might have an external keyboard attached (the Surface or even an iPad Pro) and would still be a "touch device". Let's just require shift key for new lines on tablet or higher.

I've moved isTouchDevice into browser.ts to make this more accessible to other areas of the app (we are using it in multiple places).

Copy link

render bot commented May 23, 2024

move this to the `onKeyDown` prop

Revert "do the same for tablets"

This reverts commit 47c709e2734f2acf34f89dd5aca42a75a2b56270.

do the same for tablets

don't submit message if the device is a phone on web

move `onTouchStart` to `browser.ts` globals
@haileyok haileyok force-pushed the hailey/mobile-web-return-key branch from 3033198 to 6f37c3d Compare May 23, 2024 21:31
Copy link

Old size New size Diff
7.3 MB 7.3 MB 58 B (0.00%)

@haileyok haileyok merged commit 85782ae into main May 24, 2024
6 checks passed
@haileyok haileyok deleted the hailey/mobile-web-return-key branch May 24, 2024 02:45
estrattonbailey added a commit that referenced this pull request May 28, 2024
* origin/main: (392 commits)
  Remove old onboarding (#4224)
  Replace getAgent() with reading agent (#4243)
  Bump 1.85.0 (#4237)
  bump iOS target to `14.0` (#4238)
  set `onEndReachedThreshold` to `2` for notifications (#4235)
  Run intl extract (#4217)
  Updated Japanese translation (#4144)
  Updated Chinese translation (#4147)
  Update Korean localization (#4148)
  Update catalan messages.po (#4149)
  Update Indonesian translation (#4165)
  [🐴] update convo list from message bus (#4189)
  Recover from initial failed firehose state (#4211)
  Move ALT indicator right and shrink it a bit (#4213)
  Make sure failed messages enter error state (#4210)
  [🐴] Don't submit the message on return press when on a phone (web input) (#4203)
  Include feedContext in DOM as data- (#4206)
  Improve moderation behaviors: show alert/inform sources and improve UX around threads (#3677)
  Privileged app passwords (#4200)
  [🐴] Overfetch follow for default new dialog state (#4205)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants