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

Conversation

@stevenmetzger
Copy link

Description

This PR addresses flutter/flutter#64245
TextFormField does not get blurred when tapped outside of the widget.

Related Issues

#18743
flutter/flutter#64245
flutter/flutter#64245 (comment)

Tests

I added the following tests:

A second test that verifies the same behaviour that existed prior to the regression in the case where the optional argument to use that old behaviour is included.
Because I didn't change the default behaviour I left the original test unchanged.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the contributor guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the C++, Objective-C, Java style guides for the engine.
  • I read the tree hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation.
  • All existing and new tests are passing.
  • I am willing to follow-up on review comments in a timely manner.

Reviewer Checklist

Breaking Change

Did any tests fail when you ran them? Please read handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change. If not, delete the remainder of this section.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

1 similar comment
@google-cla
Copy link

google-cla bot commented Nov 14, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@stevenmetzger
Copy link
Author

@googlebot I fixed it.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

1 similar comment
@google-cla
Copy link

google-cla bot commented Nov 14, 2020

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot removed the cla: no label Nov 14, 2020
@google-cla google-cla bot added the cla: yes label Nov 14, 2020
@chinmaygarde chinmaygarde added the platform-web Code specifically for the web engine label Nov 19, 2020
@chinmaygarde
Copy link
Member

cc @yjbanov

@yjbanov yjbanov requested a review from mdebbar January 14, 2021 23:44
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 @stevenmetzger! Overall, this PR looks good.

I'm assuming there'll be a PR for the framework side too? If you can create a framework PR, that would be great so we can review (and submit) them both together.

if (domElementIsActive && _inputConfiguration.forceCloseConnectionOnBlur) {
owner.sendTextConnectionClosedToFrameworkIfAny();
} else {
domElement.focus();
Copy link
Contributor

Choose a reason for hiding this comment

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

This code has changed in 2948fee#diff-bd1a19d2674a1ef5a2a2541853d7c2d815acbdd2255b1edf6611486b52811dbe. Could you please rebase?

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the feedback @mdebbar. Yes, I have created a PR for the framework side too. flutter/flutter#74354. Sorry I didn't include this in the first place, I wasn't sure what the best practice was for changes that touch multiple projects.

I have rebased the change.

stevenmetzger added a commit to stevenmetzger/flutter that referenced this pull request Jan 20, 2021
* Add optional argument (forceCloseConnectionOnBlur) to TextField
* This PR is meant to accompany this change to flutter/engine
  flutter/engine#22517
stevenmetzger added a commit to stevenmetzger/flutter that referenced this pull request Feb 19, 2021
* Add optional argument (forceSubmitOnFocusLost) to TextField
* This PR is meant to accompany this change to flutter/engine
  flutter/engine#22517
@Hixie
Copy link
Contributor

Hixie commented Oct 19, 2021

@mdebbar is this on your radar?

@mdebbar
Copy link
Contributor

mdebbar commented Oct 20, 2021

The framework companion of this PR was closed due to inactivity. I'm closing this one too.

@stevenmetzger feel free to re-open and update the PRs.

@mdebbar mdebbar closed this Oct 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants