Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@Satsrag
Copy link
Contributor

@Satsrag Satsrag commented Sep 7, 2023

For flutter/flutter/125875

When registering customized TextInputControl, the _PlatformTextInputControl sends inputType = TextInputType.none to the engine. After receiving TextInputType.none, the engine on the Web will create a <input> element instead of <textarea>. So there is no way to input \n(multiline).

This is my solution. I tested in Android Chrome, iOS Safari, and macOS Chrome. It works for me. But I'm not sure about other use cases. I pleasure, If someone gives me suggestions.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie or stuartmorgan on the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@google-cla
Copy link

google-cla bot commented Sep 7, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions bot added the platform-web Code specifically for the web engine label Sep 7, 2023
Copy link
Contributor

@mdebbar mdebbar left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

It makes sense to fix this bug, but I'm not sure if we should always treat TextInputType.none as multiline.

@Satsrag
Copy link
Contributor Author

Satsrag commented Dec 25, 2023

I'm sorry about asking for review again and again. But this time, I think that all work is done. Ask for a review again.
In framework PR, forceMultiline was renamed to isMultiline. So here I was renamed to isMultiline and added tests.

Copy link
Contributor

@htoor3 htoor3 left a comment

Choose a reason for hiding this comment

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

Thank you for this! This lgtm. Before merging, let's verify the framework approach is the correct one with @Renzo-Olivares

const EngineInputType();

static EngineInputType fromName(String name, {bool isDecimal = false}) {
static EngineInputType fromName(String name, {bool isDecimal = false, bool isMultiline= false}) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: change isMultiline= false to isMultiline = false

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry about this. Now I have fixed it. Thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@htoor3, Happy New Year! The framework PR has been merged. Is it time to merge this PR?

auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jan 3, 2024
For #125875 and flutter/engine#45522

According to [this discussion](#139446 (comment)), Just added `forceMultiline` to JSON on `_configurationToJson`. @LongCatIsLooong @Renzo-Olivares
@Satsrag Satsrag force-pushed the input_control_bug branch from 5e18965 to 7523e7d Compare January 3, 2024 07:51
@htoor3
Copy link
Contributor

htoor3 commented Jan 3, 2024

lgtm, thank you @Satsrag for your contribution!

@Satsrag
Copy link
Contributor Author

Satsrag commented Jan 9, 2024

@mdebbar, Please have a review.

@Satsrag
Copy link
Contributor Author

Satsrag commented Jan 27, 2024

@htoor3 when this PR will be merged?

@htoor3 htoor3 added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 29, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 29, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Jan 29, 2024

auto label is removed for flutter/engine/45522, due to This PR has not met approval requirements for merging. The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.

  • Merge guidelines: A PR needs at least one approved review if the author is already part of flutter-hackers or two member reviews if the author is not a flutter-hacker before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

@htoor3
Copy link
Contributor

htoor3 commented Jan 29, 2024

Let's get a review from @mdebbar and then we can get this merged

Copy link
Contributor

@mdebbar mdebbar left a comment

Choose a reason for hiding this comment

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

Thanks for helping make Flutter better!

The PR looks good to me with some minor suggestions.

@Satsrag
Copy link
Contributor Author

Satsrag commented Feb 7, 2024

Thanks for helping make Flutter better!

The PR looks good to me with some minor suggestions.

@mdebbar Thank you! Fixed according to your suggestion.

@mdebbar mdebbar added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 7, 2024
@auto-submit auto-submit bot merged commit 8a99fc4 into flutter:main Feb 7, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 7, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 7, 2024
…143082)

flutter/engine@1ac6beb...6807342

2024-02-07 [email protected] Roll Skia from 0fb71bedffa2 to 7777976cd518 (3 revisions) (flutter/engine#50435)
2024-02-07 [email protected] Fix: On the Web, cannot support multiline inputting when registering customized TextInputControl (flutter/engine#45522)
2024-02-07 [email protected] Roll Skia from 3cc2a15196cb to 0fb71bedffa2 (1 revision) (flutter/engine#50429)
2024-02-07 [email protected] Roll Skia from 1b266b36a4c8 to 3cc2a15196cb (1 revision) (flutter/engine#50427)
2024-02-07 [email protected] [Impeller] Always pop clips on restore. (flutter/engine#50419)
2024-02-07 [email protected] Roll Dart SDK from 35269fa71956 to 452dd17120b7 (1 revision) (flutter/engine#50424)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants