Skip to content

Bug with Cursor Movement in iPhone Safari #58

Open

Description

@mycalls
  1. Run the sample code in Safari on an iPhone.
  2. Moving the cursor causes the character before the cursor to be deleted.
import 'package:flutter/material.dart';
import 'package:re_editor/re_editor.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

final _initialText =
    List.generate(500, (int index) => '${index + 1} abcde').join('\n');

class _MyHomePageState extends State<MyHomePage> {
  final _controller = CodeLineEditingController.fromText(_initialText);

  @override
  void dispose() {
    _controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('re_editor smaple'),
      ),
      body: CodeEditor(
        controller: _controller,
      ),
    );
  }
}

Screenshots
https://github.com/user-attachments/assets/6df245ed-1815-4f6f-87a1-ff522152d69f

Device:

  • OS: iOS
  • Version 18.2

Activity

  1. added
    bug
    on Dec 31, 2024
  2. hommes-doutant commented on Mar 19, 2025

    @hommes-doutant

    I've also noticed this bug on android when testing the behaviour in the reqable app for #71

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

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions