Skip to content

Android app: native <select> dropdown opens at the top of the screen on wide windows (tablets, unfolded Fold) #5249

Closed

Description

@Willhong

Summary

In the Android app, a native <select> inside a plugin page opens its option list at the top of the screen, right under the status bar, instead of next to the field. It happens only on wide windows (an unfolded Galaxy Z Fold, tablets). On phone-width windows the WebView shows the centered picker dialog and nothing is wrong. The same page in a desktop or mobile browser opens the list under the field.

Versions and environment

  • bb from source at main 92dc2c1a1, started with pnpm start:worktree on a clean data dir (macOS 26).
  • Android app built from the same commit: apps/mobile pnpm build:android:dev (app.getbb.mobile.dev), react-native-webview 13.16.1 with bb's patch, React Native 0.86.2, Expo 57.
  • Android 16 (API 36) emulator, Android System WebView 133.0.6943.137, window resized to an unfolded Fold: adb shell wm size 1856x2160 && adb shell wm density 420.
  • First seen on a real Galaxy Z Fold8 (unfolded) with the bb Android app.

Steps to reproduce

  1. Create a plugin whose page has a native <select> below the top of the page. Minimal plugin (bb plugin new select-repro, then replace app.tsx and server.ts):

    // app.tsx
    import { useState } from "react";
    import { definePluginApp } from "@get-bb/plugin-sdk/app";
    
    function SelectReproPage() {
      const [value, setValue] = useState("apple");
      return (
        <div style={{ padding: 24, maxWidth: 560 }}>
          <h1>Native select repro</h1>
          <div style={{ marginTop: 240 }}>
            <select value={value} onChange={(event) => setValue(event.target.value)} style={{ width: "100%", fontSize: 16 }}>
              <option value="apple">Apple</option>
              <option value="banana">Banana</option>
              <option value="cherry">Cherry</option>
            </select>
            <p>Selected: {value}</p>
          </div>
        </div>
      );
    }
    
    export default definePluginApp((app) => {
      app.slots.navPanel({ id: "select-repro", title: "Select repro", icon: "ListTodo", path: "select-repro", component: SelectReproPage });
    });
    // server.ts
    import type { BbPluginApi } from "@get-bb/plugin-sdk";
    export default async function plugin(bb: BbPluginApi) {
      bb.log.info("loaded");
    }
  2. bb plugin install . on a bb server.

  3. On Android, use a wide window: an unfolded Fold or a tablet. On an emulator, run adb shell wm size 1856x2160 && adb shell wm density 420, then restart the app.

  4. Connect the app to the server, open Select repro from the navigation rail, and tap the field.

Did not reproduce: the same page at phone width (centered dialog, correct), and the same page in Chrome on desktop and Android (list under the field).

Expected vs actual

  • Expected: the option list opens next to the field, as in a browser.
  • Actual: the option list opens at the top-left of the WebView, right under the status bar, as wide as the screen. Selecting an option still works.

Before and after on an unfolded-Fold-sized window

Left: main. Right: with the fix proposed below.

Evidence

On wide windows Chromium does not show the picker dialog. It shows a dropdown anchored to a child view it adds to the WebView: com.google.android.webview:id/dropdown_popup_window. While the list is open, adb shell dumpsys activity top shows that anchor never laid out:

com.reactnativecommunity.webview.RNCWebView{… 0,0-1856,2160 …}
  android.view.View{6a969d8 V.ED..... ......I. 0,0-0,0 #2010086 com.google.android.webview:id/dropdown_popup_window}

Its bounds stay 0,0-0,0, and the I flag means it requested layout but never got one. React Native does not run layout for child views it did not create, so the anchor stays at the WebView's origin and the list opens there.

The same bug is reported against react-native-webview as react-native-webview#3424. The stale bot closed it; the latest comments say it still happens. RNCWebView.java in react-native-webview v16.0.0 has no change in this area.

The bb shell renders every page in that WebView (ProfileWebViewScreen.tsx). bb's own UI uses custom selects, so this only shows on plugin pages that use a native <select>.

What you ruled out

  • No bb issue or PR matches "select" with "android", "webview", or "dropdown".
  • Not the plugin page's CSS: no ancestor has zoom, transform, or position: fixed, and the page is correct in a browser.
  • Not window insets: the anchor is at 0,0 inside the WebView. It is not offset by the status bar height.
  • Still happens on main at 92dc2c1a1 with a clean data dir.

Suggested priority and effort

Low to medium. It affects plugin pages with native selects on Android tablets and foldables. Workaround: plugins can draw their own dropdown. No data loss. The fix is a few lines in bb's existing react-native-webview patch (PR to follow).

Checks

  • I reproduced this on the latest release or on main, or I say above that I could not.
  • I searched open and closed issues for the same problem.
  • If an agent wrote this, the body ends with > AGENT GENERATED and links the thread or report. (Investigated in a local bb thread; the fix is on Willhong/bb fix/android-select-dropdown-anchor.)

AGENT GENERATED

Activity

  1. added theissue type on Oct 9, 2026
  2. added
    mobile
    no-repro
    on Oct 9, 2026
  3. bb-slop-cop commented on Oct 9, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority: Low · Effort: Low · area: mobile.
    • Investigation report: NOT REPRODUCED · root-cause confidence: medium · reproduction label: no-repro.
    • Source-supported mechanism: React Native terminates child layout requests, while the patched WebView has no explicit child-layout replay. Both clean trusted-main checkouts give identical source diagnostics; Android runtime tools are unavailable, so popup placement remains unverified. This verdict does not establish that the bug is absent.
    • No new PR: existing open PR Anchor native select dropdowns on Android large screens #5250 already links this issue. Its proposed fix was reviewed statically, not executed.

    AGENT GENERATED

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

    mobileno-repro

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions