webf icon indicating copy to clipboard operation
webf copied to clipboard

After the jump of tag a, the channels of dart and js are no longer useful

Open chengming111 opened this issue 6 months ago • 8 comments

Affected version

0.16.2

Flutter versions

3.22.3

No same issues found.

  • [X] Yes, I search all issues but not found.

Steps to Reproduce

After clicking the Submit button on the homepage, the loading animation can be displayed normally, but after the page jumps, an error message appears when clicking the Submit button.

Code example

  1. There is a function 'submitMap' in plugin submitMap(jsonString) { return webf.methodChannel.invokeMethod('submitMap', jsonString); }

  2. in dart case 'submitMap': showLoading(); // Simulate processing, hide the loading after 2 seconds await Future.delayed(Duration(seconds: 2)); hiddenLoading(); onSubmit(args[0]); return null;

  3. In html and js, I have

    const submit = document.getElementById('submit'); submit.addEventListener('click', async(e) => { ...... await window.form.submitMap(jsonString); });

Expected results

loading animation

Actual results

截屏2024-08-22 16 16 09

chengming111 avatar Aug 22 '24 08:08 chengming111