|
@@ -267,9 +267,9 @@ class _ZefyrSelectionOverlayState extends State<ZefyrSelectionOverlay>
|
267
|
267
|
if (_scope.controller.getStyleForSelection(selection).contains(NotusAttribute.link)) {
|
268
|
268
|
// 当前点击的是link
|
269
|
269
|
var position = paragraph.getRenderBoxPositionForOffset(localPoint);
|
270
|
|
- // 此处加1是点击text尾,不算点中
|
|
270
|
+ // 第一个字符和最后一个字符将不触发onTap
|
271
|
271
|
final TextSpan span = paragraph.text.getSpanForPosition(TextPosition(
|
272
|
|
- offset: position.offset + 1,
|
|
272
|
+ offset: position.offset == 0 ? position.offset - 1 : position.offset + 1,
|
273
|
273
|
affinity: position.affinity,
|
274
|
274
|
));
|
275
|
275
|
final recognizer = (span?.recognizer as TapGestureRecognizer);
|