Skip to content

Multiline textfield not work properly in flutter iframe #178743

Description

@nikzor

Steps to reproduce

  1. Create a flutter app, put textfield inside
  2. Build web and put your app to the server, so you can add it to iframe by the link
  3. Create iframe with flutter in react
    I can reproduce this issue in Safari on iOS 18.6.2

Expected results

Expected result: When user press on textfield screen will scroll up and textfield appears up to keyboard

Actual results

Actual result: Keyboard overlap screen elements until something typed in

Code sample

Code sample
import 'package:flutter/material.dart';

void main() {
  runApp(const MainApp());
}

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Column(
          mainAxisAlignment: MainAxisAlignment.end,
          children: [TextField(keyboardType: TextInputType.multiline)],
        ),
      ),
    );
  }
}
// app/page.tsx
export default function Home() {
    return (
        <main style={{ minHeight: "100vh", display: "grid", placeItems: "center", padding: "2rem" }}>
            <iframe
                src="http://192.168.3.84:8081"
                title="Flutter App"
                style={{ width: "100%", maxWidth: 1024, height: 700, border: "1px solid #e5e5e5", borderRadius: 12 }}
                allow="fullscreen; clipboard-read; clipboard-write"
                loading="lazy"
            />
        </main>
    );
}

Screenshots or Video

Screenshots / Video demonstration

https://github.com/user-attachments/assets/d4970387-7626-4dd1-91ee-5993bbafb063 - actual result

https://github.com/user-attachments/assets/446e833a-de4c-4433-9141-f65af095ada0 - expected result

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.38.1, on macOS 15.4 24E248 darwin-arm64, locale ru-RU) [572ms]
    • Flutter version 3.38.1 on channel stable at /Users/nzorin/development/fvm_cache/versions/3.38.1
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b45fa18946 (6 days ago), 2025-11-12 22:09:06 -0600
    • Engine revision b5990e5ccc
    • Dart version 3.10.0
    • DevTools version 2.51.1
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android,
      enable-ios, cli-animations, enable-native-assets, omit-legacy-version-file, enable-lldb-debugging

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0-rc4) [2,7s]
    • Android SDK at /Users/nzorin/Library/Android/sdk
    • Emulator version 36.1.9.0 (build_id 13823996) (CL:N/A)
    • Platform android-36, build-tools 35.0.0-rc4
    • ANDROID_HOME = /Users/nzorin/Library/Android/sdk
    • Java binary at: /opt/homebrew/opt/openjdk@17/bin/java
      This JDK is specified in your Flutter configuration.
      To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment Homebrew (build 17.0.17+0)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.3) [2,7s]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16E140
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [12ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Connected device (3 available) [6,6s]
    • iPhone SE (3rd generation) (mobile) • 367261B1-E417-47CD-A612-D915176DAB56 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator)
    • macOS (desktop)                     • macos                                • darwin-arm64   • macOS 15.4 24E248
      darwin-arm64
    • Chrome (web)                        • chrome                               • web-javascript • Google Chrome
      142.0.7444.162

[✓] Network resources [871ms]
    • All expected network resources are available.

• No issues found!

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: text inputEntering text in a text field or keyboard related problemsbrowser: safari-iosonly manifests in Safari on iOSfound in release: 3.38Found to occur in 3.38found in release: 3.39Found to occur in 3.39has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions