AuraQ / AutoCompleteForMendix

An autocomplete widget for mendix
Apache License 2.0
8 stars 31 forks source link

Focus issue - when you click tab instead of 'enter' #69

Open vertexbx opened 3 years ago

vertexbx commented 3 years ago

image

Issue: you could only use 'enter' when you wanted to go the the next 'input field' OR if you were clicking 'tab' the pop-up window of this widget was re-opening or closing. Therefore you couldn't go to the next input field with TAB. The code below solves this issue.

@file : AutoCompleteForMendix.js @version : 6.0.0 @author : Iain Lindsay @date : 2019-05-15 @copyright : AuraQ Limited 2020 @license : Apache V2

Line 306 - we added code to line 306

.on("select2:closing",function(e){ setTimeout(()=>self._$combo.select2('focus'),50); });

This so that the ‘tab’ key can be used and if the ‘focus’ is on true in the widget, this will not close & re-open the widget but just continues to the the next input field in Mendix

Hopefully this can help also other users. Thanks for you widget :)