Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/web_ui/lib/src/engine/text_editing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ class TextEditingElement {
_subscriptions.add(domElement.onKeyUp.listen((event) {
_handleChange(event);
}));
_subscriptions.add(domElement.onSelect.listen(_handleChange));
Comment thread
nturgut marked this conversation as resolved.
} else {
_subscriptions.add(html.document.onSelectionChange.listen(_handleChange));
}
Expand Down Expand Up @@ -379,7 +380,7 @@ class TextEditingElement {
throw UnsupportedError(
'Unsupported input type: ${inputConfig.inputType}');
}
html.document.body.append(domElement);
domRenderer.glassPaneElement.append(domElement);
}

void _removeDomElement() {
Expand Down
3 changes: 3 additions & 0 deletions lib/web_ui/test/text_editing_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ void main() {
expect(document.activeElement, input);
expect(editingElement.domElement, input);

// Input is appended to the glass pane.
expect('${editingElement.domElement.parent.tagName}', 'FLT-GLASS-PANE');
Comment thread
nturgut marked this conversation as resolved.
Outdated

editingElement.disable();
expect(
document.getElementsByTagName('input'),
Expand Down