StevenDevooght / tinyMCE-mention

Mention/Autocomplete plugin for tinyMCE WYSIWYG editor.
http://stevendevooght.github.io/tinyMCE-mention/
220 stars 95 forks source link

Down arrow (keyboard) not work in the drop down for more then 10 elements in a list #82

Open hardik-singhal opened 4 years ago

hardik-singhal commented 4 years ago

@StevenDevooght Please look into this

StevenDevooght commented 4 years ago

Hi,

Can you create a fiddle reproducing the problem?

shivarchit commented 4 years ago

@StevenDevooght , I had a similar issue, where I needed to view options via keyboard only, the options get hidden when the <ul> dropdown has a fixed height and a large number of options are available, the highlighted option does not remain, in the view. Here is fiddle example

https://jsfiddle.net/shivarchit/og2fq3b4 I fixed this by adding scrollIntoView(false) under your plugin.js when keyboard functions are triggered.

Also, I accidentally created the wrong pull request, sorry about that. This is what I added,

var element = this.$dropdown.find('li').eq(index); element[0].scrollIntoView({ block: 'nearest', inline: 'nearest', behavior: 'smooth' });

to highlightNextResult and highlightPreviousResult functions in plugin.js

hardik-singhal commented 4 years ago

@shivarchit Thankyou for providing the fiddle, I also have the same issue with the tinyMCE-mention . I tried the solution you provided in your last comment and it works. thanks for helping but i will ask @StevenDevooght to update this in the project so that it can be directly used without changing every time we install tinyMCE-mentions. Thanks!

developeronboard commented 4 years ago

@hardik-singhal can you favour me a help? can you check and tell whether this plugin works on mobile? If so what is the procedure?