mootools-autocompleter icon indicating copy to clipboard operation
mootools-autocompleter copied to clipboard

Mouse Hover over the results on the JSON example does not update the field's value

Open kernel52 opened this issue 11 years ago • 5 comments

I was implementing your updated version of this script on my website - thank you for this btw, excellent work! - and wanted to launch some action after the field has updated it's value (add a change event in the input field).

I was struggling until I realised that in order for the field to update it's value, you have to choose the result with the keyboard keys. In the Local version of the script (where the results come from an array) hovering with the mouse over is updating correctly the field's value.

I tested on the old version of the JSON http://digitarald.de/project/autocompleter/1-1/showcase/request-json/ and the problem existed since version 1.1 I tried to do the same test in your version but the Request script (jsonrequest.html) is not working locally for some reason...

Let me know if this is not clear to you.

Thanks!

kernel52 avatar May 03 '13 15:05 kernel52

Hi, I will have a look at this in the next round of bugs fixes. Thank you for reporting it.

angelsk avatar May 15 '13 15:05 angelsk

Apparently this problem exists from the original version of autocompleter, but thanks for having a look at!

If I can assist on something let me know!

kernel52 avatar May 15 '13 15:05 kernel52

I couldn't get the value to change on hover on the local version in the 1.1 demo. I don't think this is expected functionality.

With the mouse you choose the value with a click, this will update the input value. With the keyboard, the only reason the value changes with the arrows, is that you have to navigate some how.

Thanks

angelsk avatar Jun 26 '13 10:06 angelsk

Let me give you an example to make it a bit easier to explain. http://jsfiddle.net/xCUT8/2/ (Tested on firefox)

Consider this fiddle. When you type something say"ar" you get a set of choices to choose from.

If you use the keyboard to select one option (keys then enter) the alert will correctly print what was selected.

If you use the mouse to select one option, it will only alert what was typed in the box before selecting an element (when using default selectMode or the first option in type-ahead selectMode), whereas the value of the box is correctly updated.

kernel52 avatar Jun 30 '13 12:06 kernel52

Thanks for the jsfiddle, I'll have another look later.

angelsk avatar Jul 01 '13 11:07 angelsk