ichord / At.js

Add Github like mentions autocomplete to your application.
http://ichord.github.com/At.js
MIT License
5.3k stars 668 forks source link

$inputor.atwho('run') not work #589

Open lc-soft opened 3 years ago

lc-soft commented 3 years ago

I found the recent commit https://github.com/ichord/At.js/commit/293933cee4f76dc24068255dcd24e263f553e3c6 changes in src/app.coffee will makes the .atwho('run') method do nothing.

https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/src/api.coffee#L13

2020-11-23 13-38-03 的屏幕截图

In previous versions, the example in the document used the atwho('run') method to display the menu after loading the data.

https://github.com/ichord/At.js/wiki/APIs#run

image

But now, I have to make the following changes to show the atwho menu:

 $.getJSON(url, params, function(data) {
-    $inputor.atwho('load',':', data).atwho('run');
+    $inputor.atwho('load',':', data).data('atwho').dispatch($.Event('click'));
 });