fleather-editor / fleather

Soft and gentle rich text editing for Flutter applications.
https://fleather-editor.github.io
Other
191 stars 33 forks source link

link cannot tap on MacOS #380

Closed zhouzhuo810 closed 3 weeks ago

zhouzhuo810 commented 1 month ago

Steps to Reproduce

  1. clone demo
  2. run
  3. input www.baidu.com
  4. press ctrl + mouse single tap

Environment

Logs

GestureRecognizer _getRecognizer(Node segment) {
    print(segment);
    if (_linkRecognizers.containsKey(segment)) {
      return _linkRecognizers[segment]!;
    }

    if (isDesktop || widget.readOnly) {
      _linkRecognizers[segment] = TapGestureRecognizer(
        supportedDevices: {
          PointerDeviceKind.stylus,
          PointerDeviceKind.trackpad,
          PointerDeviceKind.mouse,
          PointerDeviceKind.invertedStylus,
        }
      )
      ..onTapCancel = () {
        print("777");
      }
      ..onSecondaryTap = () {
        print("4444");
      }
      ..onTapUp = (details) {
        print("222");
      }
      ..onTapDown = (details) {
        print("3333");
      }
        ..onTap = () => _tapLink(segment);
      print('111');
    } else {
      _linkRecognizers[segment] = LongPressGestureRecognizer()
        ..onLongPress = () => _longPressLink(segment);
    }
    return _linkRecognizers[segment]!;
  }

log :

flutter: ⟨www.baiduc.om⟩a
flutter: 111
flutter: ⟨www.baiduc.om⟩a
zhouzhuo810 commented 1 month ago

image

the first one link can tap

the second link can not tap

zhouzhuo810 commented 1 month ago

some times can tap , some times can not tap

zhouzhuo810 commented 1 month ago

and todo some times can not check

zhouzhuo810 commented 1 month ago
[1.14.4](fleather: ^1.14.4)

is work well

My code is the newest code

and I changed below:

image

because my flutter version is 3.19.6

zhouzhuo810 commented 1 month ago

It is the same result on Android.

@Amir-P

amantoux commented 3 weeks ago

@zhouzhuo810 this was fixed with #399