Skip to content

Conversation

@Hixie
Copy link
Contributor

@Hixie Hixie commented Jun 17, 2017

Introduce CompositedTransformTarget and CompositedTransformFollower
widgets, corresponding render objects, and corresponding layers.

Adjust the way text fields work to use this.

Various changes I needed to debug the issues that came up.

Fixes #3861

cc @abarth

@Hixie Hixie changed the title ext selection handles track scrolled text fields Text selection handles track scrolled text fields Jun 17, 2017
@Hixie
Copy link
Contributor Author

Hixie commented Jun 17, 2017

Depends on flutter/engine#3787 to run without failing.

@Hixie Hixie mentioned this pull request Jun 17, 2017
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this would be more efficient in two write calls...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

Choose a reason for hiding this comment

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

I bet this would be more efficient as a loop.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably, but not sufficiently to make it worth re-implementing "join" here. :-)

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe phrase this in the past tense since the drawing has already occurred.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, also added more information to the docs

Copy link
Contributor

Choose a reason for hiding this comment

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

It would be more efficient to add the two offsets before multiplying them into the transform (if both are present).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

Choose a reason for hiding this comment

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

See also ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added links to widgets

Copy link
Contributor

Choose a reason for hiding this comment

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

See also LeaderLayer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

Choose a reason for hiding this comment

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

Either make one line or use { }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, to all cases in the file

Copy link
Contributor

Choose a reason for hiding this comment

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

Use { } for multiline functions

@abarth
Copy link
Contributor

abarth commented Jun 19, 2017

LGTM

Introduce CompositedTransformTarget and CompositedTransformFollower
widgets, corresponding render objects, and corresponding layers.

Adjust the way text fields work to use this.

Various changes I needed to debug the issues that came up.
@Hixie
Copy link
Contributor Author

Hixie commented Jun 20, 2017

will land on green

@Hixie Hixie merged commit 6d32b33 into flutter:master Jun 20, 2017
@Hixie Hixie deleted the layer branch June 20, 2017 16:35
@otaviojr
Copy link

@Hixie: I made some tests here and the controls get above the title bar when scrolling. I pull the latest master release. Is it happening with someone else?

flutter

@Hixie
Copy link
Contributor Author

Hixie commented Jun 21, 2017

Yeah, that's expected. In your case, I'm guessing you're using a SingleChildListView; switching to a regular ListView should fix it. In the general case, I'm not really sure how to fix it. In a way, it's not really wrong -- the handles are on top of everything, so it makes sense that when you scroll, they'd end up on top. But obviously it's not ideal.

@otaviojr
Copy link

I put it inside a regular ListView but it do not solve the problem. Am I doing something wrong?

Another thing. When I first select the text to show controls the buttons do not draw. After the first scroll they appears.

flutter

@Hixie
Copy link
Contributor Author

Hixie commented Jun 21, 2017

Well that's not good. Please file bugs, we should fix those things!

gspencergoog pushed a commit to gspencergoog/flutter that referenced this pull request Jul 1, 2017
Introduce CompositedTransformTarget and CompositedTransformFollower
widgets, corresponding render objects, and corresponding layers.

Adjust the way text fields work to use this.

Various changes I needed to debug the issues that came up.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Selection controls don't move when their text widget is scrolled

4 participants