diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ee25198..d35c67ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [2.0.21] +* Handle click on embed object. + ## [2.0.20] * Improved UX/UI of Image widget. diff --git a/lib/src/translations/toolbar.i18n.dart b/lib/src/translations/toolbar.i18n.dart index 353b6c27..d8eba561 100644 --- a/lib/src/translations/toolbar.i18n.dart +++ b/lib/src/translations/toolbar.i18n.dart @@ -74,14 +74,15 @@ extension Localization on String { 'Gallery': 'Galeria', 'Link': 'Enlace', 'Please first select some text to transform into a link.': - 'Por favor selecciona primero un texto para transformarlo en un enlace', + 'Por favor selecciona primero un texto para transformarlo ' + 'en un enlace', }, 'tr': { 'Paste a link': 'Bağlantıyı Yapıştır', 'Ok': 'Tamam', 'Select Color': 'Renk Seçin', 'Gallery': 'Galeri', - 'Link': 'Bağlantı', + 'Link': 'Bağlantı', 'Please first select some text to transform into a link.': 'Lütfen bağlantıya dönüştürmek için bir metin seçin.', }, diff --git a/lib/src/widgets/text_line.dart b/lib/src/widgets/text_line.dart index e9e5f229..0990e797 100644 --- a/lib/src/widgets/text_line.dart +++ b/lib/src/widgets/text_line.dart @@ -876,7 +876,14 @@ class RenderEditableTextLine extends RenderEditableBox { @override bool hitTestChildren(BoxHitTestResult result, {required Offset position}) { - return _children.first.hitTest(result, position: position); + if (_body == null) return false; + final parentData = _body!.parentData as BoxParentData; + return result.addWithPaintOffset( + offset: parentData.offset, + position: position, + hitTest: (result, position) { + return _body!.hitTest(result, position: position); + }); } @override diff --git a/pubspec.yaml b/pubspec.yaml index c158fcdc..2b70bb4e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us) -version: 2.0.20 +version: 2.0.21 #author: bulletjournal homepage: https://bulletjournal.us/home/index.html repository: https://github.com/singerdmx/flutter-quill