94 Commits

Author SHA1 Message Date
Alexandre Ardhuin
0ef0f0ba5e
fix lint from an improved unnecessary_parenthesis (#83433) 2021-05-27 13:39:03 -07:00
Yegor
a05076e45b
disable ideographic script test on web (#83130) 2021-05-21 17:18:41 -07:00
YeungKC
64765d8672
done (#82286) 2021-05-13 06:09:06 -07:00
LongCatIsLooong
b970f40646
Let RenderEditable.delete directly delete from the controller text. (#82215) 2021-05-11 13:44:03 -07:00
creativecreatorormaybenot
5e2f8631f8
Fix Hit Tests in RenderEditable when Scrolled (#81040) 2021-04-26 10:54:04 -07:00
Ren You
e170ea521c
Revert "[RenderEditable] Dont paint caret when selection is invalid (#79607)" (#81076)
This reverts commit 0f8148ec16325493b1b48a21367b839167f940b9.
2021-04-23 16:00:11 -07:00
Alexandre Ardhuin
59fc92168a
add missing trailing commas (#81065) 2021-04-23 22:47:40 +02:00
Justin Hutchins
dca07d2a8a
Enable previously skipped Editable test (#80761) 2021-04-22 13:19:03 -07:00
LongCatIsLooong
0f8148ec16
[RenderEditable] Dont paint caret when selection is invalid (#79607) 2021-04-18 09:14:02 -07:00
Ricardo Canastro
136da59e6b
Support block delete with word and line modifiers (#79973)
Adds support for overridable delete/backspace keyboard shortcuts
2021-04-07 13:29:37 -07:00
Jenn Magder
a637fcd344
Revert "Support block delete with word and line modifiers (#79695)" (#79968)
This reverts commit 0ba2f6a87fbfd857c0a4e01a47e824dcab5462de.
2021-04-07 11:44:30 -07:00
Ricardo Canastro
0ba2f6a87f
Support block delete with word and line modifiers (#79695)
Support for keyboard backspace/delete shortcuts
2021-04-07 10:54:28 -07:00
chunhtai
303ce76d85
Fix RenderEditable register the raw keyboard listener twice (#79877)
* Fix RenderEditable register the raw keyboard listener twice

* skip web test
2021-04-06 11:27:31 -07:00
Greg Spencer
8859f7a799
Revert "Support block delete with word and line modifiers (#77172)" (#79674)
This reverts commit 75453e6ac6647e014765ae6d863e199efc152a16 because it breaks flutter/test/rendering/editable_test.dart

Landing on red to fix the build.
2021-04-02 15:08:13 -07:00
Ricardo Canastro
75453e6ac6
Support block delete with word and line modifiers (#77172) 2021-04-02 14:39:03 -07:00
chunhtai
2369d76a1d
Makes text selection match the native behavior (#79308) 2021-04-02 12:09:05 -07:00
chunhtai
bed88a1a5e
Fix rendereditable to check the latest text before setting the selection (#78919)
* Fix rendereditable to check the latest text before setting the selection

* add regression comment

* addressing comments and fix tests
2021-03-25 11:49:44 -07:00
Justin McCandless
541bff4058
Text Editing Movement Keys via Shortcuts (#75032)
Text editing shortcuts involving the arrow keys are no longer handled by RenderEditable's RawKeyboardListener, they use the new Shortcuts setup.  First PR in a plan to port all text editing keyboard handling to shortcuts.
2021-03-11 15:52:04 -08:00
chunhtai
b0d4d44853
Reland "fixes TextInputFormatter gets wrong old value of a selection" (#76653) 2021-03-02 11:54:02 -08:00
Justin McCandless
1794e81f61
Keep the selection after 'Copy' pressed on iOS. (#76327) 2021-02-23 15:56:04 -08:00
chunhtai
b5139515c1
Revert "fixes TextInputFormatter gets wrong old value of a selection (#75541)" (#76627)
This reverts commit a46139a2cef8144444a3e13a3970e9a267304b91.
2021-02-23 11:25:01 -08:00
chunhtai
a46139a2ce
fixes TextInputFormatter gets wrong old value of a selection (#75541) 2021-02-19 11:16:02 -08:00
Tomasz Gucio
d031a61a62
Add RenderEditable keys listener back in attach() (#75614) 2021-02-09 12:36:04 -08:00
LongCatIsLooong
76be55813b
Move caret/highlight painting to custom painters (#72828) 2021-02-01 14:41:04 -08:00
Alexandre Ardhuin
d546e1d311
fix for upcoming lint use_named_constants (#74788) 2021-01-27 20:20:44 +01:00
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
LongCatIsLooong
df28355b0c
Raw keyboard shortcuts & deletions should not read from _plainText (#71236) 2020-12-02 17:13:04 -08: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
Kate Lovett
019e90f7df
[NNBD] Migrates some rendering tests (#67449) 2020-10-07 16:27:06 -07:00
LongCatIsLooong
525e76bc7c
Positioning IME bars on iOS (#61981) 2020-09-22 18:32:05 -07:00
Kate Lovett
ea777fea1b
Skip Audit - Rendering Library (#58640) 2020-07-09 13: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
Jason Simmons
5736def36c
Handle selection ranges where getBoxesForSelection returns an empty list (#59014) 2020-06-09 11:08:04 -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
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
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
Lau Ching Jun
bc67d22449
Revert "iOS UITextInput autocorrection prompt (#45354)" (#47373)
This reverts commit 0f8c0da0a9ded2a9b7aa3bd01fcc29db80bbab0a.
2019-12-18 13:56:44 -08:00
LongCatIsLooong
0f8c0da0a9
iOS UITextInput autocorrection prompt (#45354) 2019-12-17 16:22:28 -08:00
Gary Qian
d345a3b303
Revert "Track and use fallback TextAffinity for null affinity platform TextSelections. (#44622)" (#45698)
This reverts commit 6b66d794360bb7d3ff7bf2f6dfbcbd58516c3f20.
2019-11-28 19:42:06 +09:00
Ian Hickson
449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Gary Qian
6b66d79436
Track and use fallback TextAffinity for null affinity platform TextSelections. (#44622) 2019-11-20 16:37:10 -08:00
Mouad Debbar
9307a83f7c
Changing RenderEditable.textAlign doesn't break hot reload anymore (#44605) 2019-11-11 14:35:15 -08:00