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

fix(portable-text-editor): fix safari focus issue on empty editor #5361

Open
wants to merge 2 commits into
base: next
Choose a base branch
from

Conversation

sjelfull
Copy link
Member

@sjelfull sjelfull commented Dec 13, 2023

Description

This fixes a issue in Safari where focus in a activated, empty PTE input a second time won't allow you to type unless you click the "Empty" placeholder precisely.

Fixes EDX-122.

What to review

  • That focus behaviour behaves the same was as before in all the normal browsers
  • That focus activates properly on repeated tabbing into the same empty input

Notes for release

  • Fixes an issue where focus on a empty Portable Text Input won't work consistently in Safari

@sjelfull sjelfull self-assigned this Dec 13, 2023
Copy link

vercel bot commented Dec 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview Dec 13, 2023 0:45am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2023 0:45am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Dec 13, 2023 0:45am

Copy link
Contributor

Package Documentation Change
sanity -3%
Full Report
@sanity/diff
This branch Next branch
13 documented 13 documented
16 not documented 16 not documented
@sanity/block-tools
This branch Next branch
4 documented 4 documented
9 not documented 9 not documented
@sanity/types
This branch Next branch
54 documented 54 documented
235 not documented 235 not documented
sanity/desk
This branch Next branch
85 documented 85 documented
60 not documented 60 not documented
@sanity/portable-text-editor
This branch Next branch
21 documented 21 documented
44 not documented 44 not documented
@sanity/mutator
This branch Next branch
7 documented 7 documented
4 not documented 4 not documented
@sanity/cli
This branch Next branch
1 documented 1 documented
30 not documented 30 not documented
@sanity/schema/_internal
This branch Next branch
0 documented 0 documented
9 not documented 9 not documented
@sanity/util/paths
This branch Next branch
1 documented 1 documented
15 not documented 15 not documented
sanity/router
This branch Next branch
17 documented 17 documented
26 not documented 26 not documented
@sanity/util/legacyDateFormat
This branch Next branch
0 documented 0 documented
3 not documented 3 not documented
@sanity/schema
This branch Next branch
0 documented 0 documented
2 not documented 2 not documented
sanity/cli
This branch Next branch
2 documented 2 documented
0 not documented 0 not documented
@sanity/vision
This branch Next branch
0 documented 0 documented
3 not documented 3 not documented
@sanity/util/fs
This branch Next branch
0 documented 0 documented
3 not documented 3 not documented
sanity/_internal
This branch Next branch
0 documented 0 documented
1 not documented 1 not documented
@sanity/util/content
This branch Next branch
1 documented 1 documented
5 not documented 5 not documented
sanity
This branch Next branch
169 documented 176 documented
837 not documented 844 not documented

Copy link
Contributor

github-actions bot commented Dec 13, 2023

Component Testing Report Updated Dec 13, 2023 12:46 PM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 14s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 2s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 8s 3 0 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 6s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 15s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 8s 9 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 39s 18 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 6s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 3s 3 0 0

@skogsmaskin
Copy link
Member

The placeholder seems to be pushed down on Chrome:

image

@sjelfull sjelfull requested a review from skogsmaskin December 13, 2023 13:31
Copy link
Member

@skogsmaskin skogsmaskin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to break stuff on Chrome, see my screenshot.

@rexxars
Copy link
Member

rexxars commented Aug 13, 2024

@sjelfull Is this still relevant? /cc @christianhg

@sjelfull sjelfull assigned christianhg and unassigned sjelfull Aug 14, 2024
@sjelfull
Copy link
Member Author

@rexxars I believe so, re-assigning to @christianhg

@pedrobonamin pedrobonamin removed their request for review August 21, 2024 09:11
@juice49 juice49 requested a review from a team as a code owner November 22, 2024 11:56
@juice49 juice49 requested review from rexxars and removed request for a team November 22, 2024 11:56
@rexxars rexxars requested review from christianhg and removed request for rexxars December 4, 2024 23:15
@juice49 juice49 force-pushed the next branch 2 times, most recently from 9caf5d8 to 691aad1 Compare January 23, 2025 13:56
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.

4 participants