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

Playground Subscript bug on mobile Chrome & Firefox on Android #3882

Open
TrySpace opened this issue Dec 20, 2024 · 0 comments
Open

Playground Subscript bug on mobile Chrome & Firefox on Android #3882

TrySpace opened this issue Dec 20, 2024 · 0 comments
Labels
bug Something isn't working mobile

Comments

@TrySpace
Copy link

TrySpace commented Dec 20, 2024

Description

Typing in the online example on platejs.org will strangely flip between subscript and normal text.
Notice the second line also changing the text with the title.
See gif for demonstration on Chrome mobile: https://imgur.com/a/WPCzROk

More Side effects

Furthermore pressing enter will not work and I can't make a new line. (probably because the subscript plugin is capturing it)

When

This issue arose after updating from v33 to 40. I tried downgrading slate as far as it's allowed under plate v40 but no change, and the issue doesn't occur on the slate website playground.

Solution

The bug can be isolated and avoided by disabling the SubscriptPlugin

Context

I've ruled out that it is because of autoformat rules, at least not for subscript because I don't have them enabled for subscript.

Browsers

The issue is worse on Firefox mobile, where it won't even be possible to type any text at all.

Other issues

Furthermore the issue initially looked like a revival of the old Gboard keyboard/android chrome issue (which seems to be solved, but that might've been android update that did it), but thankfully it isn't. But it did seem similar in that if you type different characters really fast, some characters would end up behind the cursor instead of in front... (this doesn't happen when it's the same character) but this seems to be unrelated to this issue and I'll try to isolate this to see if it is related.

When I only enable SuperscriptPlugin and disable the SubscriptPlugin then the issue doesn't happen.

Reproduction steps

1. Go to platejs.org on chrome or firefox mobile on Android
2. Click on the playground
3. Type something

Plate version

"@udecode/plate": "^40.3.4",
"@udecode/plate-common": "^40.3.1",
"@udecode/plate-core": "^40.3.1",
"@udecode/plate-basic-marks": "^40.0.0",

Slate React version

"slate": "^0.112.0",

Screenshots

Here's the state from my dev reproduction, by typing "Test" in a field:

Capture

Chrome, Firefox

@TrySpace TrySpace added the bug Something isn't working label Dec 20, 2024
@TrySpace TrySpace changed the title Subscript bug on mobile Chrome & Firefox on Android Playground Subscript bug on mobile Chrome & Firefox on Android Dec 20, 2024
@zbeyens zbeyens added the mobile label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mobile
Projects
None yet
Development

No branches or pull requests

2 participants