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

[skwasm] Text input decorations and text are often invisible #141001

Closed
parlough opened this issue Jan 5, 2024 · 1 comment · Fixed by flutter/engine#51074
Closed

[skwasm] Text input decorations and text are often invisible #141001

parlough opened this issue Jan 5, 2024 · 1 comment · Fixed by flutter/engine#51074
Labels
e: web_skwasm Skwasm rendering backend for web engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list platform-web Web applications specifically team-web Owned by Web platform team triaged-web Triaged by Web platform team

Comments

@parlough
Copy link
Member

parlough commented Jan 5, 2024

Text input doesn't work consistently in skwasm. Most times when you try typing, you can't see the characters, cursor, or selection information, but text is being input.

  1. Add a TextInput or similar to an app.
  2. Build with skwasm flutter build web --wasm --web-renderer=skwasm
  3. Serve with necessary flags (dart pub global run dhttpd --path=build/web_wasm --headers="Cross-Origin-Embedder-Policy=require-corp;Cross-Origin-Opener-Policy=same-origin")
  4. Visit the site on a recent version of Chrome (I used 122.0.6182.0)
  5. Try to type in the text field and note that input visuals are missing, including the text.

Result (skwasm):

The following TextField has had input added and is currently selected, but no visuals (text, cursor, etc) are being displayed.

TextField rendering as empty

Version information:

Flutter 3.18.0-19.0.pre.74 • channel main • https://github.com/flutter/flutter
Framework • revision 4ff2396b86 (42 minutes ago) • 2024-01-04 20:23:28 -0500
Engine • revision f2f00a438e
Tools • Dart 3.3.0 (build 3.3.0-279.0.dev) • DevTools 2.31.0
@parlough parlough added engine flutter/engine repository. See also e: labels. platform-web Web applications specifically e: web_skwasm Skwasm rendering backend for web team-web Owned by Web platform team labels Jan 5, 2024
@parlough parlough changed the title [skwasm] Text input visuals and text are often invisible [skwasm] Text input decorations and text are often invisible Jan 5, 2024
@yjbanov yjbanov added P1 High-priority issues at the top of the work list triaged-web Triaged by Web platform team labels Jan 11, 2024
@yjbanov yjbanov added P2 Important issues not at the top of the work list and removed P1 High-priority issues at the top of the work list labels Feb 22, 2024
eyebrowsoffire added a commit to eyebrowsoffire/engine that referenced this issue Feb 28, 2024
This fixes flutter/flutter#141001
This also fixes flutter/flutter#143743

* We need to always call `setStrutEnabled(true)` on `StrutStyle`.
* `getLineMetricsAt` had reversed ternary logic.
* Ported unit tests from CanvasKit over to UI to cover Skwasm and HTML
* The HTML renderer should return 0 line metrics for an empty paragraph.
auto-submit bot pushed a commit to flutter/engine that referenced this issue Feb 29, 2024
This fixes flutter/flutter#141001
This also fixes flutter/flutter#143743

* We need to always call `setStrutEnabled(true)` on `StrutStyle`.
* `getLineMetricsAt` had reversed ternary logic.
* We also need to apply the rounding hack in Skwasm.
* Ported unit tests from CanvasKit over to UI to cover Skwasm ~and HTML~
* ~The HTML renderer should return 0 line metrics for an empty paragraph.~
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
e: web_skwasm Skwasm rendering backend for web engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list platform-web Web applications specifically team-web Owned by Web platform team triaged-web Triaged by Web platform team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants