jQuery UI Widgets › Forums › Lists › DropDownList › Dropdown change events not firing with keyboard selection
Tagged: DropDownList, javascript dropdownlist, jQuery DropDownList, jqwidgets dropdownlist, jqxDropDownList, Knockout
This topic contains 7 replies, has 4 voices, and was last updated by Yavor Dashev 2 years, 9 months ago.
-
Author
-
I am using Knockout to bind a jqxDropDownList like so:
<div id="ddRoomName" data-bind="jqxDropDownList: { source: $U.PageData.RoomCombo().contents, displayMember: 'Display', valueMember: 'Code', width: '100%', height: '28px', selectedIndex: selectedRoomNameIndex, placeHolder: $U.Const.placeHolderFilter, autoDropDownHeight: false }"></div>
The change events are not firing when the user uses the following combination of actions. Is this a known issue?
1. User expands the dropdown with the mouse
2. User presses a key on their keyboard to jump down the list. Example, user presses “n” to jump to the options starting with “n”.
3. User then makes a selection by clicking on that option with their mouse.When the user makes a selection with the above actions, a change has not been registered in the code. What can be done to fix this?
Hello baragon,
Thank you for the interest.
Please, take a look at this example:
http://jsfiddle.net/txhi/x9vggzvz/Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comI studied the link you provided but that did not fix the issue. Please take a look at this short, simple fiddle to see what is happening:
http://jsfiddle.net/baragon23/pw893ycj/4/Hello baragon,
Thank you for this example.
In the previous example, I try to suggest you an approach how to bind to “select” and “change” event.
If you give me more details what you want to achieve I will try to provide you a solution.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHere is an updated example of what I’m trying to do:
http://jsfiddle.net/baragon23/pw893ycj/22/I have multiple dropdowns such as this one on many pages throughout the application. Each page has a form which saves the data to the database. I cannot just simply create a jquery bind for every dropdown throughout the site.
The issue is that the user will not always use their mouse to make a selection. They will use the keyboard sometimes and then when the form is saved, the drop down fields will not receive the updated value because the subscribe function was never fired.
Hello baragon,
I would like to suggest you look at this forum topic:
https://www.jqwidgets.com/community/topic/knockout-event-binding/
I tested your example on that way and it seems to work fine.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHello, Why do I need to click multiple times on the dropdown to get the dropdown list? Please help me out !!
Hi princegaijar,
I would like to ask you to create a code example reproducing this scenario in order to be able to give you a solution about it.
Please, do not hesitate to contact us if you have any additional questions.
Best Regards,
Yavor Dashev
jQWidgets team
https://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.