Prepend the accessibility placeholder (flutter/engine#51050)
Prepends the accesibility placeholder. Previously it was being appended (last child) to the body. Relevant Issues are: * Design doc: https://flutter.dev/go/focus-management * Focus in web multiview: https://github.com/flutter/flutter/issues/137443 * Platform dispatcher changes: https://github.com/flutter/engine/pull/49841 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
@@ -80,7 +80,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher {
|
||||
registerHotRestartListener(dispose);
|
||||
AppLifecycleState.instance.addListener(_setAppLifecycleState);
|
||||
ViewFocusBinding.instance.addListener(invokeOnViewFocusChange);
|
||||
domDocument.body?.append(accessibilityPlaceholder);
|
||||
domDocument.body?.prepend(accessibilityPlaceholder);
|
||||
_onViewDisposedListener = viewManager.onViewDisposed.listen((_) {
|
||||
// Send a metrics changed event to the framework when a view is disposed.
|
||||
// View creation/resize is handled by the `_didResize` handler in the
|
||||
|
||||
@@ -409,8 +409,9 @@ void testMain() {
|
||||
});
|
||||
});
|
||||
|
||||
test('appends an accesibility placeholder', () {
|
||||
test('adds the accesibility placeholder', () {
|
||||
expect(dispatcher.accessibilityPlaceholder.isConnected, isTrue);
|
||||
expect(domDocument.body!.children.first, dispatcher.accessibilityPlaceholder);
|
||||
});
|
||||
|
||||
test('removes the accesibility placeholder', () {
|
||||
|
||||
Reference in New Issue
Block a user