Skip to content

Allow delayed keyboard focus in the iOS mobile WebView #8568

Backlog

Description

@haseab

The workflow

I am building a mobile view inside BB that needs to show an editor immediately after a tap, then focus its input after asynchronous work finishes. I would like that delayed focus request to open the iOS software keyboard without requiring a second tap.

What happens today

The mobile shell leaves keyboardDisplayRequiresUserAction at react-native-webview's default. In an isolated iOS 27.2 simulator harness using react-native-webview 14.0.1, calling input.focus() from a two-second timer focused the DOM input but left the software keyboard hidden.

Minimal page behavior to reproduce inside a WebView:

<button onclick="document.getElementById('editor').hidden = false; setTimeout(() => document.getElementById('description').focus(), 2000)">
  Open editor
</button>
<div id="editor" hidden><input id="description" /></div>

With the default setting, native accessibility output reported {"kind":"focus-request","elapsedMs":2019,"active":true}, while the keyboard remained hidden. After blurring the input, synchronous focus from a tap displayed the keyboard as a positive control. Hardware keyboard simulation was disabled before the valid comparison; Toggle Software Keyboard was not used.

What you would expect

Allow the mobile view's delayed focus request to show the software keyboard. The proposed change is one added line in one file: pass keyboardDisplayRequiresUserAction={false} to the existing mobile shell WebView.

In the same simulator harness, that setting displayed an actual QWERTY keyboard after delayed focus requests at 2,028 ms and 2,001 ms. Native accessibility output listed the individual keyboard keys.

Context and alternatives

This supports immediate editor feedback while focus waits for asynchronous work. Requiring another tap on the input is the current workaround. Physical-iPhone behavior and time-entry performance have not been measured; the simulator comparison verifies the WebView setting itself, not a full current-upstream application build.

Current upstream source at dea060157bc71a7fb20aff65398feaf023330f86 does not set this prop:

<ShellWebView
key={`${loadScope}#${reloadKey}`}
ref={webViewRef}
initialUrl={sourceUrl}
style={{ backgroundColor: tokens.background }}
originWhitelist={SHELL_ORIGIN_WHITELIST}
sharedCookiesEnabled
javaScriptEnabled
domStorageEnabled
allowsInlineMediaPlayback
mediaPlaybackRequiresUserAction={false}
mediaCapturePermissionGrantType="grant"
hideKeyboardAccessoryView
allowsBackForwardNavigationGestures={false}
bounces={false}
setBuiltInZoomControls={false}
pullToRefreshEnabled={false}
automaticallyAdjustContentInsets={false}

Searched open and closed issues and PRs for keyboardDisplayRequiresUserAction, delayed keyboard focus, and mobile keyboard focus. The related iOS composer recovery reports concern recovery after closing the keyboard rather than allowing a timer-triggered focus request.

One-line prototype: haseab@c2f273d

This is a request for maintainer approval of the mobile behavior change.

Checks

  • I searched open and closed issues for the same request.
  • The report ends with the agent-generated disclosure.

AGENT GENERATED

Activity

  1. added
    mobile
    on Dec 2, 2026
  2. bb-slop-cop commented on Dec 2, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Applied: Type: Feature · Priority: Low · Effort: Low · Labels: mobile.

    No pull request: enabling delayed keyboard display adds behavior rather than fixing an existing workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    mobile

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions