-
Notifications
You must be signed in to change notification settings - Fork 29.1k
Single tap on the previous selection should toggle the toolbar on iOS… #108913
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
Conversation
… a single tap on within the previous selection should not change it
cc: @chunhtai if you have any thoughts on this solution since global selection should probably do something similar. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 I think you and I had nearly the same exact approach.
); | ||
|
||
return renderEditable.selection!.start < textPosition.offset | ||
&& renderEditable.selection!.end > textPosition.offset; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this work if the selection is collapsed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked offline about not handling ==
.
The reason I didn't handle the ==
case is because say we have hello world
with world
selected, and we want to tap at the edge of world
to collapse the selection and move the cursor to the end of the field. Because we handle ==
we can't do that and the selection stays on world
.
* 7d1323c Updating expiring cirrus key. (flutter/flutter#109461) * a85902a Roll Flutter Engine from de118a55ade0 to c354e0e04cea (2 revisions) (flutter/flutter#109462) * 28de3d4 Roll Flutter Engine from c354e0e04cea to d1b18b5d6811 (1 revision) (flutter/flutter#109466) * a624cb7 Keep `dirty` manipulations private to `Element` base class (flutter/flutter#109401) * dce82f7 Remove deprecated Ruby File.exists? in helper script (flutter/flutter#109428) * 7887ca5 Revert "Keep `dirty` manipulations private to `Element` base class (#109401)" (flutter/flutter#109481) * 237a298 Roll Flutter Engine from d1b18b5d6811 to a2f3bd58ce73 (1 revision) (flutter/flutter#109472) * fe2fc8d Single tap on the previous selection should toggle the toolbar on iOS… (flutter/flutter#108913) * 696c6fb Roll Flutter Engine from a2f3bd58ce73 to fb19700742c3 (6 revisions) (flutter/flutter#109482) * 17bc0ce Roll Flutter Engine from fb19700742c3 to 2180e62f6c7e (1 revision) (flutter/flutter#109483) * 4265015 Roll Flutter Engine from 2180e62f6c7e to cd1a1cb757f5 (1 revision) (flutter/flutter#109488) * c142dd3 Roll Flutter Engine from cd1a1cb757f5 to 5cc5c5f04f0a (1 revision) (flutter/flutter#109490) * 8a55c36 Roll Flutter Engine from 5cc5c5f04f0a to 18dca3de7496 (2 revisions) (flutter/flutter#109493) * d50c5b1 Roll Flutter Engine from 18dca3de7496 to 83771593cb55 (1 revision) (flutter/flutter#109505) * 97901da Cleaner test.dart output. (flutter/flutter#109206) * fb3c8ea Roll Flutter Engine from 83771593cb55 to f49a617535af (1 revision) (flutter/flutter#109509) * 5fcd9c2 Update README.md (flutter/flutter#109506) * 4dd7065 Add onOpened callback to PopupMenuButton (flutter/flutter#103753) * ed3238e Roll Flutter Engine from f49a617535af to cc9f4c63b7e5 (1 revision) (flutter/flutter#109518) * 8b1ca3f Roll Flutter Engine from cc9f4c63b7e5 to 4656c2f46cad (1 revision) (flutter/flutter#109524) * 20ffb32 Roll Flutter Engine from 4656c2f46cad to 16fb19e72f88 (1 revision) (flutter/flutter#109526) * 087750f Roll Flutter Engine from 16fb19e72f88 to 9c3c233e2639 (1 revision) (flutter/flutter#109532) * 4aba124 Roll Flutter Engine from 9c3c233e2639 to f0c3829e90ce (1 revision) (flutter/flutter#109536) * 2bce108 Roll Plugins from 9fb7654 to 094f1c3 (7 revisions) (flutter/flutter#109543) * 97d9a2f Roll Flutter Engine from f0c3829e90ce to 8c019cdd446f (2 revisions) (flutter/flutter#109548) * 458d618 Roll Flutter Engine from 8c019cdd446f to 198b0051a5a2 (1 revision) (flutter/flutter#109552) * c873c21 Roll Flutter Engine from 198b0051a5a2 to 33fccf564973 (1 revision) (flutter/flutter#109557)
* 7d1323c Updating expiring cirrus key. (flutter/flutter#109461) * a85902a Roll Flutter Engine from de118a55ade0 to c354e0e04cea (2 revisions) (flutter/flutter#109462) * 28de3d4 Roll Flutter Engine from c354e0e04cea to d1b18b5d6811 (1 revision) (flutter/flutter#109466) * a624cb7 Keep `dirty` manipulations private to `Element` base class (flutter/flutter#109401) * dce82f7 Remove deprecated Ruby File.exists? in helper script (flutter/flutter#109428) * 7887ca5 Revert "Keep `dirty` manipulations private to `Element` base class (#109401)" (flutter/flutter#109481) * 237a298 Roll Flutter Engine from d1b18b5d6811 to a2f3bd58ce73 (1 revision) (flutter/flutter#109472) * fe2fc8d Single tap on the previous selection should toggle the toolbar on iOS… (flutter/flutter#108913) * 696c6fb Roll Flutter Engine from a2f3bd58ce73 to fb19700742c3 (6 revisions) (flutter/flutter#109482) * 17bc0ce Roll Flutter Engine from fb19700742c3 to 2180e62f6c7e (1 revision) (flutter/flutter#109483) * 4265015 Roll Flutter Engine from 2180e62f6c7e to cd1a1cb757f5 (1 revision) (flutter/flutter#109488) * c142dd3 Roll Flutter Engine from cd1a1cb757f5 to 5cc5c5f04f0a (1 revision) (flutter/flutter#109490) * 8a55c36 Roll Flutter Engine from 5cc5c5f04f0a to 18dca3de7496 (2 revisions) (flutter/flutter#109493) * d50c5b1 Roll Flutter Engine from 18dca3de7496 to 83771593cb55 (1 revision) (flutter/flutter#109505) * 97901da Cleaner test.dart output. (flutter/flutter#109206) * fb3c8ea Roll Flutter Engine from 83771593cb55 to f49a617535af (1 revision) (flutter/flutter#109509) * 5fcd9c2 Update README.md (flutter/flutter#109506) * 4dd7065 Add onOpened callback to PopupMenuButton (flutter/flutter#103753) * ed3238e Roll Flutter Engine from f49a617535af to cc9f4c63b7e5 (1 revision) (flutter/flutter#109518) * 8b1ca3f Roll Flutter Engine from cc9f4c63b7e5 to 4656c2f46cad (1 revision) (flutter/flutter#109524) * 20ffb32 Roll Flutter Engine from 4656c2f46cad to 16fb19e72f88 (1 revision) (flutter/flutter#109526) * 087750f Roll Flutter Engine from 16fb19e72f88 to 9c3c233e2639 (1 revision) (flutter/flutter#109532) * 4aba124 Roll Flutter Engine from 9c3c233e2639 to f0c3829e90ce (1 revision) (flutter/flutter#109536) * 2bce108 Roll Plugins from 9fb7654 to 094f1c3 (7 revisions) (flutter/flutter#109543) * 97d9a2f Roll Flutter Engine from f0c3829e90ce to 8c019cdd446f (2 revisions) (flutter/flutter#109548) * 458d618 Roll Flutter Engine from 8c019cdd446f to 198b0051a5a2 (1 revision) (flutter/flutter#109552) * c873c21 Roll Flutter Engine from 198b0051a5a2 to 33fccf564973 (1 revision) (flutter/flutter#109557)
* 7d1323c Updating expiring cirrus key. (flutter/flutter#109461) * a85902a Roll Flutter Engine from de118a55ade0 to c354e0e04cea (2 revisions) (flutter/flutter#109462) * 28de3d4 Roll Flutter Engine from c354e0e04cea to d1b18b5d6811 (1 revision) (flutter/flutter#109466) * a624cb7 Keep `dirty` manipulations private to `Element` base class (flutter/flutter#109401) * dce82f7 Remove deprecated Ruby File.exists? in helper script (flutter/flutter#109428) * 7887ca5 Revert "Keep `dirty` manipulations private to `Element` base class (#109401)" (flutter/flutter#109481) * 237a298 Roll Flutter Engine from d1b18b5d6811 to a2f3bd58ce73 (1 revision) (flutter/flutter#109472) * fe2fc8d Single tap on the previous selection should toggle the toolbar on iOS… (flutter/flutter#108913) * 696c6fb Roll Flutter Engine from a2f3bd58ce73 to fb19700742c3 (6 revisions) (flutter/flutter#109482) * 17bc0ce Roll Flutter Engine from fb19700742c3 to 2180e62f6c7e (1 revision) (flutter/flutter#109483) * 4265015 Roll Flutter Engine from 2180e62f6c7e to cd1a1cb757f5 (1 revision) (flutter/flutter#109488) * c142dd3 Roll Flutter Engine from cd1a1cb757f5 to 5cc5c5f04f0a (1 revision) (flutter/flutter#109490) * 8a55c36 Roll Flutter Engine from 5cc5c5f04f0a to 18dca3de7496 (2 revisions) (flutter/flutter#109493) * d50c5b1 Roll Flutter Engine from 18dca3de7496 to 83771593cb55 (1 revision) (flutter/flutter#109505) * 97901da Cleaner test.dart output. (flutter/flutter#109206) * fb3c8ea Roll Flutter Engine from 83771593cb55 to f49a617535af (1 revision) (flutter/flutter#109509) * 5fcd9c2 Update README.md (flutter/flutter#109506) * 4dd7065 Add onOpened callback to PopupMenuButton (flutter/flutter#103753) * ed3238e Roll Flutter Engine from f49a617535af to cc9f4c63b7e5 (1 revision) (flutter/flutter#109518) * 8b1ca3f Roll Flutter Engine from cc9f4c63b7e5 to 4656c2f46cad (1 revision) (flutter/flutter#109524) * 20ffb32 Roll Flutter Engine from 4656c2f46cad to 16fb19e72f88 (1 revision) (flutter/flutter#109526) * 087750f Roll Flutter Engine from 16fb19e72f88 to 9c3c233e2639 (1 revision) (flutter/flutter#109532) * 4aba124 Roll Flutter Engine from 9c3c233e2639 to f0c3829e90ce (1 revision) (flutter/flutter#109536) * 2bce108 Roll Plugins from 9fb7654 to 094f1c3 (7 revisions) (flutter/flutter#109543) * 97d9a2f Roll Flutter Engine from f0c3829e90ce to 8c019cdd446f (2 revisions) (flutter/flutter#109548) * 458d618 Roll Flutter Engine from 8c019cdd446f to 198b0051a5a2 (1 revision) (flutter/flutter#109552) * c873c21 Roll Flutter Engine from 198b0051a5a2 to 33fccf564973 (1 revision) (flutter/flutter#109557)
Can we roll this back? Seems it is causing crashes: #111660. |
…e toolbar on iOS flutter#108913" (flutter#111995)" This reverts commit 4abe6fd.
* 7d1323c Updating expiring cirrus key. (flutter/flutter#109461) * a85902a Roll Flutter Engine from de118a55ade0 to c354e0e04cea (2 revisions) (flutter/flutter#109462) * 28de3d4 Roll Flutter Engine from c354e0e04cea to d1b18b5d6811 (1 revision) (flutter/flutter#109466) * a624cb7 Keep `dirty` manipulations private to `Element` base class (flutter/flutter#109401) * dce82f7 Remove deprecated Ruby File.exists? in helper script (flutter/flutter#109428) * 7887ca5 Revert "Keep `dirty` manipulations private to `Element` base class (#109401)" (flutter/flutter#109481) * 237a298 Roll Flutter Engine from d1b18b5d6811 to a2f3bd58ce73 (1 revision) (flutter/flutter#109472) * fe2fc8d Single tap on the previous selection should toggle the toolbar on iOS… (flutter/flutter#108913) * 696c6fb Roll Flutter Engine from a2f3bd58ce73 to fb19700742c3 (6 revisions) (flutter/flutter#109482) * 17bc0ce Roll Flutter Engine from fb19700742c3 to 2180e62f6c7e (1 revision) (flutter/flutter#109483) * 4265015 Roll Flutter Engine from 2180e62f6c7e to cd1a1cb757f5 (1 revision) (flutter/flutter#109488) * c142dd3 Roll Flutter Engine from cd1a1cb757f5 to 5cc5c5f04f0a (1 revision) (flutter/flutter#109490) * 8a55c36 Roll Flutter Engine from 5cc5c5f04f0a to 18dca3de7496 (2 revisions) (flutter/flutter#109493) * d50c5b1 Roll Flutter Engine from 18dca3de7496 to 83771593cb55 (1 revision) (flutter/flutter#109505) * 97901da Cleaner test.dart output. (flutter/flutter#109206) * fb3c8ea Roll Flutter Engine from 83771593cb55 to f49a617535af (1 revision) (flutter/flutter#109509) * 5fcd9c2 Update README.md (flutter/flutter#109506) * 4dd7065 Add onOpened callback to PopupMenuButton (flutter/flutter#103753) * ed3238e Roll Flutter Engine from f49a617535af to cc9f4c63b7e5 (1 revision) (flutter/flutter#109518) * 8b1ca3f Roll Flutter Engine from cc9f4c63b7e5 to 4656c2f46cad (1 revision) (flutter/flutter#109524) * 20ffb32 Roll Flutter Engine from 4656c2f46cad to 16fb19e72f88 (1 revision) (flutter/flutter#109526) * 087750f Roll Flutter Engine from 16fb19e72f88 to 9c3c233e2639 (1 revision) (flutter/flutter#109532) * 4aba124 Roll Flutter Engine from 9c3c233e2639 to f0c3829e90ce (1 revision) (flutter/flutter#109536) * 2bce108 Roll Plugins from 9fb7654 to 094f1c3 (7 revisions) (flutter/flutter#109543) * 97d9a2f Roll Flutter Engine from f0c3829e90ce to 8c019cdd446f (2 revisions) (flutter/flutter#109548) * 458d618 Roll Flutter Engine from 8c019cdd446f to 198b0051a5a2 (1 revision) (flutter/flutter#109552) * c873c21 Roll Flutter Engine from 198b0051a5a2 to 33fccf564973 (1 revision) (flutter/flutter#109557)
This change continues @doppio work from #95644.
On iOS, a single tap on the previous selection should toggle the toolbar. This change accomplishes that, and also when a tap occurs within a previous selection, the selection should stay the same. For example if there is a non collapsed selection, and we tap on it, this should toggle the toolbar and keep the selection. Previously the selection would move to the word edge closest to the tapped position.
Fixes b/173627308 and #48434
Pre-launch Checklist
///
).