jQWidgets Forums
jQuery UI Widgets › Forums › Lists › ComboBox › IE jqcombobox onkeyup form input fields
This topic contains 4 replies, has 2 voices, and was last updated by raoul 11 years, 3 months ago.
-
Author
-
Hi,
I just noticed that in IE after changing jqcombobox values for example the onkeyup event on other form elements such as standard text input fields is no longer fired. This also happens in the jqcombobox demos.
I coulnt find anything related to this on the forum. Is this a known issue? Is there a workaround for this?
Thanks,
RaoulHi Raoul,
jqxComboBox supports a specific set of events documented on this page: http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxcombobox/jquery-combobox-api.htm. If you would like to use that widget, then use only the events available on the API page. Other events are not supported.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
But those are the events for jqxComboBox.
What I meant was, put an ordinary form textarea on the page and assign an onkeyup event to it. It fires just fine in IE. Then add a jqxComboBox to the page. Without changing the jqxComboBox, the textarea onkeyup still fires just fine. Then change the jqxcombobox selected item, the onkeyup event for the textarea no longer fires. This seems not right. It only happens in IE, tested on IE11.
Thanks,
RaoulHi Raoul,
That is not related to jqxComboBox. Our widget does not affect any events of other HTML Elements. I suggest you to check the Start and Closing tags of your HTML Elements.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.commaybe it is just my IE 11?
[code]
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta name=”keywords” content=”jQuery ComboBox, List, ListBox, Popup List, jqxComboBox, jqxListBox, List Widget, ListBox Widget, DropDownList Widget” />
<meta name=”description” content=”The jqxComboBox in this demo is populated with items and show
how to display image next to each item.”/>
<title id=’Description’>The jqxComboBox represents a widget that contains a list of
selectable items displayed in a drop-down. Users can enter information in the text
box portion and search for a specific item. The widget comes with built-in auto-complete
support.</title>
<link rel=”stylesheet” href=”../../jqwidgets/styles/jqx.base.css” type=”text/css” />
<script type=”text/javascript” src=”../../scripts/gettheme.js”></script>
<script type=”text/javascript” src=”../../scripts/jquery-1.10.2.min.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxcore.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxbuttons.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxscrollbar.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxlistbox.js”></script>
<script type=”text/javascript” src=”../../jqwidgets/jqxcombobox.js”></script>
</head>
<body>
<div id=’content’>
<script type=”text/javascript”>
$(document).ready(function () {
var theme = “”;var source = new Array();
for (i = 0; i < 10; i++) {
var movie = ‘avatar.png’;
var title = ‘Avatar’;
var year = 2009;switch (i) {
case 1:
movie = ‘endgame.png’;
title = ‘End Game’;
year = 2006;
break;
case 2:
movie = ‘priest.png’;
title = ‘Priest’;
year = 2011;
break;
case 3:
movie = ‘unknown.png’;
title = ‘Unknown’;
year = 2011;
break;
case 4:
movie = ‘unstoppable.png’;
title = ‘Unstoppable’;
year = 2010;
break;
case 5:
movie = ‘twilight.png’;
title = ‘Twilight’;
year = 2008;
break;
case 6:
movie = ‘kungfupanda.png’;
title = ‘Kung Fu Panda’;
year = 2008;
break;
case 7:
movie = ‘knockout.png’;
title = ‘Knockout’;
year = 2011
break;
case 8:
movie = ‘theplane.png’;
title = ‘The Plane’;
year = 2010;
break;
case 9:
movie = ‘bigdaddy.png’;
title = ‘Big Daddy’;
year = 1999;
break;
}
var html = “<div style=’padding: 0px; margin: 0px; height: 95px; float: left;’><div style=’margin-top: 10px; font-size: 13px;’>”
+ “<b>Title</b><div>” + title + “</div><div style=’margin-top: 10px;’><b>Year</b><div>” + year.toString() + “</div></div></div>”;
source[i] = { html: html, title: title };
}// Create a jqxComboBox
$(“#jqxWidget”).jqxComboBox({ source: source, selectedIndex: 0, width: ‘250’, height: ’25px’, theme: theme });$(“#textfield”).on(‘keyup’, function(e) {
alert(‘ok’)
});
});
</script>
<div id=’jqxWidget’>
</div>
</div>
<p> </p>
<p>
<input type=”text” name=”textfield” id=”textfield”/>
<input type=”text” name=”textfield1″ id=”textfield1″ onkeyup=”alert(‘ok’)”/>
</p>
</body>
</html>
[/code]– test the textfields, keyup event is fired correctly
– put focus on the jq combobox
– put focus back on the textfiels and hit a key, no keyup event fired…
– also, when the combobox does have focus and if you then first click somewhere on the page before putting focus on the texfields the ke up event is triggered, but we cannot expect our visitors to do that first…Raoul
-
AuthorPosts
You must be logged in to reply to this topic.