185 Commits

Author SHA1 Message Date
J-P Nurmi
803c07fe3b
Fix EditableText.enableInteractiveSelection on desktop & web (#70972)
selectionEnabled was not taken into account in:

key movement handling in RenderEditable
mouse drag handling in TextSelectionGestureDetectorBuilder
2020-12-17 16:56:47 -08:00
Justin McCandless
fb3dba74b7
Correct text selection pivot points (#71756) 2020-12-14 11:18:05 -08:00
chunhtai
58081821ab
Editable text should call onSelectionChanged when selection changes a… (#72011) 2020-12-11 13:53:04 -08:00
LongCatIsLooong
df28355b0c
Raw keyboard shortcuts & deletions should not read from _plainText (#71236) 2020-12-02 17:13:04 -08:00
Michael Goderbauer
7a3a29e71f
Fixes Intrinsics for RenderParagraph and RenderWrap (#70656) 2020-11-20 17:24:58 -08:00
J-P Nurmi
153f3d23c3
Fix Editable(Text) shortcuts to respect read-only on desktop (#69891) 2020-11-11 15:34:05 -08:00
Greg Spencer
88809aa247
Standardize dartdoc macro names (#69445) 2020-11-02 13:28:05 -08:00
Greg Spencer
c0ef94780c
Fix spelling errors (#69451)
My yearly pass to fix spelling errors in the API dartdocs.
2020-10-31 03:12:27 -07:00
Justin McCandless
09dc5599dd
Selecting spaces (#68227)
When attempting to select a space on mobile, Flutter will try to select the word before the space too, if one exists.
2020-10-27 11:30:07 -07:00
stuartmorgan
3da995adec
Handle backspace in text fields (#68812)
Currently the framework handles delete, but not backspace, so embeddings
all have to implement backspace handling themselves. This eliminates
that inconsistency and allows simplified code in embeddings by adding
backspace handling.

It also fixes a bug uncovered in the delete handling where deleting a
selection would also delete the next character after the selection.
2020-10-22 13:51:07 -07:00
YeungKC
c706abf075
Fix error cursor position for left and right arrow event after text selection (#68402) 2020-10-19 12:42:03 -07:00
Matej Knopp
24abe59f38
Provide oldLayer where possible (#67320) 2020-10-09 13:07:05 -07:00
LongCatIsLooong
cd6279c1ec
fix _getPixelPerfectCursorOffset logic when infinite (#66845) 2020-09-28 20:37:04 -07:00
LongCatIsLooong
525e76bc7c
Positioning IME bars on iOS (#61981) 2020-09-22 18:32:05 -07:00
Ian Hickson
8a6a76a334
migrate rendering to nullsafety (#64621) 2020-08-27 16:38:10 -07:00
LongCatIsLooong
6536f65048
Revert "Warns when single line text fields overflow (#63639)" (#64573)
This reverts commit 0ab5ecc86b1f13854ecc0cb4a89fbdc9938c5212.
2020-08-25 11:11:15 -07:00
LongCatIsLooong
0ab5ecc86b
Warns when single line text fields overflow (#63639) 2020-08-24 18:16:05 -07:00
Ian Hickson
93395b4890
Add null safety migration annotations. (#64227) 2020-08-21 11:21:04 -07:00
Nolan Scobie
43c1b34cf5
Add punctuation for unterminated sentences in doc comments (#62755)
* Add punctuation for unterminated sentences in doc comments

* Addressing review nit
2020-08-06 19:18:52 -04:00
LongCatIsLooong
64173f75c3
Check if a double is NaN before converting to it int (#61940) 2020-07-23 08:31:08 -07:00
Michael Goderbauer
4b4287ba78
Make it an error to break macros in docs (and fix existing broken macros) (#62071) 2020-07-23 08:29:46 -07:00
Pierre-Louis
5d854f63a0
Implement customizable cursor height (#61714) 2020-07-21 07:36:03 -07:00
Justin McCandless
2a573a32fe
Reland Characters Usage (#59778)
Use Dart's characters package to fix user-facing grapheme cluster bugs.
2020-06-23 15:28:26 -07:00
liyuqian
42e02d60d3
Reland non-breaking "Add clipBehavior to widgets with clipRect #55977" (#59364)
* Revert "Revert "Add clipBehavior to widgets with clipRect (#55977)" (#58344)"

This reverts commit 1d395c5e187370f2838bb043d3b438029b484bfc.

* Add missed Overflow
2020-06-17 10:57:40 -07:00
renyou
a99d146ba9
Revert "Characters Package (#53381)" (#59677)
This reverts commit e0ed12c73a3df00b72af6e5657d35035a76c90db.
2020-06-17 08:39:34 -07:00
Justin McCandless
e0ed12c73a
Characters Package (#53381) 2020-06-16 16:53:04 -07:00
Alexandre Ardhuin
4d7525f05c
Opt out nnbd in packages/flutter (#59186)
* add language version 2.8 in packages/flutter

* enable non-nullable analyzer flag
2020-06-11 14:11:30 +02:00
Darren Austin
012cee2731
Typo fixing sweep through packages/flutter. (#59219) 2020-06-11 05:10:01 -07:00
Jason Simmons
5736def36c
Handle selection ranges where getBoxesForSelection returns an empty list (#59014) 2020-06-09 11:08:04 -07:00
MH Johnson
4bae771509
[Line Heights] Add textHeightBehavior to SelectableText. (#58530) 2020-06-03 11:53:02 -07:00
Mehmet Fidanboylu
1d395c5e18
Revert "Add clipBehavior to widgets with clipRect (#55977)" (#58344)
This reverts commit cd593dae1961ca2bc5c045a310f16e6cdffc8294.
2020-05-31 07:41:50 -07:00
liyuqian
cd593dae19
Add clipBehavior to widgets with clipRect (#55977)
* Add clipBehavior to RenderFlex

* Add clipBehavior to FittedBox

* Add clipBehavior to Flex and FittedBox

* Add clipBehavior to UnconstrainedBox

* Add clipBehavior to Stack and Wrap

* Add clipBehavior to TextEditable

* Add clipBehavior to ListWheelScrollView

* Add clipBehavior to SingleChildScrollView

* Add clipBehavior to RenderViewportBase's widgets

Those widgets are NestedScrollView and ShrinkWrappingViewport.

* Fix tests

* Remove enum Overflow and fix typo

* Remove clipToSize

* Analyze fix

* Remove Mixin and other small fixes

* Fix tests and respect Stack's default clipBehavior

* Add Overflow back to make it non-breaking

* Restore clipBehavior to make it non-breaking

* Small fixes

* Fix rebase
2020-05-29 15:38:50 -07:00
Justin McCandless
de8cf8b530
Customizable obscuringCharacter (#55415) 2020-04-24 17:59:02 -07:00
stuartmorgan
1cad96a63e
Handle surrogate pairs in RenderEditable (#55246)
The arrow key and delete handling in RenderEditable was using single
index values, which made it possible to move the cursor into the middle
of a surrogate pair (allowing things like adding text at that insertion
point), or to delete half of a surrogate pair. Since unpaired surrogate
pairs aren't valid UTF-16, doing so would cause assertions in the text
field.

This makes the arrow key and delete key handling surrogate-aware
(although not grapheme-cluster-aware, which is a larger fix that is out
of scope here).

Part of #55014
2020-04-22 12:21:03 -07:00
chunhtai
baafc66817
Enable gesture recognizer in selectable rich text (#54479) 2020-04-16 10:05:02 -07:00
LongCatIsLooong
4af5fe2c37
Reland "iOS UITextInput autocorrection prompt (#45354)" (#54119) 2020-04-07 12:11:14 -07:00
cjng96
d62c7ecce5
Ignore key events on edit control on web platform (#52656) (#52661) 2020-04-01 00:31:03 -07:00
Greg Spencer
1ba4f1f509
Add Linux and Windows target platforms (#51519)
This PR adds the linux and windows target platform enum values, along with automatically setting the defaultTargetPlatform to the appropriate value on those platforms.

Fixes #31366
2020-03-03 04:38:04 -08:00
stuartmorgan
6a337a76dd
Revert "Fix handling backspace on macos with text selection (#49760)" (#51577)
This reverts commit 9375377fa99e8faae8a573e9fe92b8712d33e82d.

Fixes #51511
2020-02-28 14:28:34 -08:00
Jonah Williams
213027dd82
[Perf/codesize] Reland: Reduce constraint member reads during layout
This reverts commit 2132a0c7a3d2a107190238ca0c5570baa0467bb7.
2020-02-28 10:02:57 -08:00
Ferhat
2132a0c7a3
Revert "[Perf/codesize] Reduce constraint member reads during layout (#51418)" (#51489)
This reverts commit 69080e07e6bb178332bf546cf83054a85b91b2fe.
2020-02-26 15:51:30 -08:00
Ferhat
69080e07e6
[Perf/codesize] Reduce constraint member reads during layout (#51418) 2020-02-25 13:50:21 -08:00
Alexandre Ardhuin
f15c887c63
change quote to avoid escapes (#50368) 2020-02-11 20:58:27 +01:00
Gary Qian
3e1a124e0e
Expose selectionHeightStyle and selectionWidthStyle on TextFields (#48917) 2020-02-05 17:38:03 -08:00
Matthew Cliatt
9375377fa9
Fix handling backspace on macos with text selection (#49760)
Fixes #46150 by catching both the delete and backspace keys, rather than just the delete key.
2020-01-30 09:36:41 -08:00
Dan Field
8b2993337a
revert #48985 (#49572) 2020-01-27 14:36:02 -08:00
Anthony
b67d5ec6e9 [a11y] Make sure RenderFractionalTranslation updates its semantics after the translation field is set (#48985) 2020-01-17 15:13:01 -08:00
Justin McCandless
c61e55ad6b Selection menu not showing when selection is 0,0 (#49000) 2020-01-17 10:58:01 -08:00
Alexandre Ardhuin
4f9b6cf017
enable lint prefer_final_in_for_each (#47724) 2020-01-07 16:32:04 +01:00
Gary Qian
b011ea5468
Pass _caretPrototype to prevent cache miss (#46720) 2019-12-20 06:46:49 +09:00