If you have a select with n lines and you use keyboard for selection (i.e. typ “ge” to find the first entry with “ge”) the events onChange and onInputChange fires for each letter you type.
So the event handling procedure executes for each letter. How to avoid this - what is the correct event firing only if the entry is finally selected.
this is exactly the behavior I told and for me it’s wrong. If I type “ge” I get the onChange but this is not onChange.
For me onChange is when closing the dropdown by mouseclick or hit return on the keyboard.
Think bout a longer list with
aa1
aa2
aa3
aa4
bb1
bb2
bb3
bb4
cc1
cc2
cc3
cc4
if you type bb -> bb1 is selcted but you want to select bb3 so onChange is fired for bb1 - this are bad examples. My list is a list of names so if i type peter I want to have the first peter selected but no onChange. After its selected I want to scroll down using the down key or keyboard ore use the mouse to select
peter lastname1
peter lastname2
peter lastname 3
peter lastname2. So use the keyboard is only a quick preselection and then the correct is selected and the onChange fires.
If you use standard HTML onChange it fires not after 2 characters or when the first entry is found. It fires after you close the dropdown with return or mouseclick. This is the real onChange because this is selection. If peter lastname1 is selected and you click with the mouse beside the dropdown so the dropdown closed without making a change.
While testing from my side, the same snippet produces onChange event only when option is fully selected ( enter pressed or button clicked )
In which browser issue occurs for you? If it is Chrome or Firefox, please check the list of used extensions, some of them can interfere with the DHTMLX content.
Can you share the version of FireFox so you can check it locally
Also, please try to disable all plugins, if it resolves the issue, the the issue was caused by plugins for sure.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan