From 249de684388b4eb3cdb28c934a9ae67aea19b802 Mon Sep 17 00:00:00 2001 From: "auto-submit[bot]" <98614782+auto-submit[bot]@users.noreply.github.com> Date: Fri, 21 Jun 2024 12:56:47 +0000 Subject: [PATCH] Reverts "Fix focus management for text fields (#51009)" (flutter/engine#53502) Reverts: flutter/engine#51009 Initiated by: jiahaog Reason for reverting: This causes b/348598454. We're getting test failures with stack traces like the following after this PR: ``` Cannot get renderObject of inactive element. In order for an element to have a valid renderObject, it must be active, which means it is part of the tree. Instead, this element is in the _ElementLifecycle.inactive state. If you called this method from a State object, consider guarding ``` Original PR Author: tugorez Reviewed By: {mdebbar} This change reverts the following previous change: Fix focus management for text fields This PR: 1. Refactors the DOM `focus` function to take [options][1] 2. Removes the timers sorrounding the `activeDomElement.focus()` so that the input elements get focused as immediate as possible. 3. Prevents the default on pointerdown in a Flutter View and schedules a `requestViewFocusChange` to claim focus in that view after some time. This gives `2` the opportunity to focus the right `` or `