Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
6a337a76
Unverified
Commit
6a337a76
authored
Feb 28, 2020
by
stuartmorgan
Committed by
GitHub
Feb 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Fix handling backspace on macos with text selection (#49760)" (#51577)
This reverts commit
9375377f
. Fixes #51511
parent
9b4159c5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
52 deletions
+2
-52
editable.dart
packages/flutter/lib/src/rendering/editable.dart
+2
-7
editable_text_test.dart
packages/flutter/test/widgets/editable_text_test.dart
+0
-45
No files found.
packages/flutter/lib/src/rendering/editable.dart
View file @
6a337a76
...
@@ -437,17 +437,12 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
...
@@ -437,17 +437,12 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
LogicalKeyboardKey
.
arrowDown
,
LogicalKeyboardKey
.
arrowDown
,
};
};
static
final
Set
<
LogicalKeyboardKey
>
_deleteKeys
=
<
LogicalKeyboardKey
>{
LogicalKeyboardKey
.
delete
,
LogicalKeyboardKey
.
backspace
,
};
static
final
Set
<
LogicalKeyboardKey
>
_shortcutKeys
=
<
LogicalKeyboardKey
>{
static
final
Set
<
LogicalKeyboardKey
>
_shortcutKeys
=
<
LogicalKeyboardKey
>{
LogicalKeyboardKey
.
keyA
,
LogicalKeyboardKey
.
keyA
,
LogicalKeyboardKey
.
keyC
,
LogicalKeyboardKey
.
keyC
,
LogicalKeyboardKey
.
keyV
,
LogicalKeyboardKey
.
keyV
,
LogicalKeyboardKey
.
keyX
,
LogicalKeyboardKey
.
keyX
,
...
_deleteKeys
,
LogicalKeyboardKey
.
delete
,
};
};
static
final
Set
<
LogicalKeyboardKey
>
_nonModifierKeys
=
<
LogicalKeyboardKey
>{
static
final
Set
<
LogicalKeyboardKey
>
_nonModifierKeys
=
<
LogicalKeyboardKey
>{
...
@@ -502,7 +497,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
...
@@ -502,7 +497,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
// _handleShortcuts depends on being started in the same stack invocation
// _handleShortcuts depends on being started in the same stack invocation
// as the _handleKeyEvent method
// as the _handleKeyEvent method
_handleShortcuts
(
key
);
_handleShortcuts
(
key
);
}
else
if
(
_deleteKeys
.
contains
(
key
)
)
{
}
else
if
(
key
==
LogicalKeyboardKey
.
delete
)
{
_handleDelete
();
_handleDelete
();
}
}
}
}
...
...
packages/flutter/test/widgets/editable_text_test.dart
View file @
6a337a76
...
@@ -3741,51 +3741,6 @@ void main() {
...
@@ -3741,51 +3741,6 @@ void main() {
reason:
'on
$platform
'
,
reason:
'on
$platform
'
,
);
);
expect
(
controller
.
text
,
isEmpty
,
reason:
'on
$platform
'
);
expect
(
controller
.
text
,
isEmpty
,
reason:
'on
$platform
'
);
/// Paste and Select All
await
sendKeys
(
tester
,
<
LogicalKeyboardKey
>[
LogicalKeyboardKey
.
keyV
,
LogicalKeyboardKey
.
keyA
,
],
shortcutModifier:
true
,
platform:
platform
,
);
expect
(
selection
,
equals
(
const
TextSelection
(
baseOffset:
0
,
extentOffset:
testText
.
length
,
affinity:
TextAffinity
.
downstream
,
),
),
reason:
'on
$platform
'
,
);
expect
(
controller
.
text
,
equals
(
testText
),
reason:
'on
$platform
'
);
// Backspace
await
sendKeys
(
tester
,
<
LogicalKeyboardKey
>[
LogicalKeyboardKey
.
delete
,
],
platform:
platform
,
);
expect
(
selection
,
equals
(
const
TextSelection
(
baseOffset:
0
,
extentOffset:
72
,
affinity:
TextAffinity
.
downstream
,
),
),
reason:
'on
$platform
'
,
);
expect
(
controller
.
text
,
isEmpty
,
reason:
'on
$platform
'
);
}
}
testWidgets
(
'keyboard text selection works as expected on linux'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'keyboard text selection works as expected on linux'
,
(
WidgetTester
tester
)
async
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment