re-editor
re-editor copied to clipboard
Bug with Cursor Movement in iPhone Safari
- Run the sample code in Safari on an iPhone.
- 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
I've also noticed this bug on android when testing the behaviour in the reqable app for #71