Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Closed Issue: ComboBox Javascript Error OnMouseWheel Event [25946]

$
0
0
When there are no items in the combobox and the user moves the mouse wheel, a javascript error is thrown, which in IE causes no other controls on the form to be used and has no affect in Firefox.

The error is this:
this.ajax__combobox_prototypes[i]._popupBehavior is null

And it happens in this code (at line 908):

898 if (typeof (_this) === 'undefined') {
899 _this = this;
900 }
901
902 // hide the option list when user mousewheel scrolls outside of it
903 if (typeof (this.ajax__combobox_prototypes) === 'undefined') {
904 this._popupBehavior.hide();
905 }
906 else {
907 for (var i = 0; i < this.ajax__combobox_prototypes.length; i++) {
908 this.ajax__combobox_prototypes[i]._popupBehavior.hide();
909 }
910 }
911
912 return true;

Code affected:
# $addHandlers(document,
# {
# 'click': this._documentClickHandler,
# 'mousewheel': this._documentMouseWheelHandler
# }, this);
#
# // FF doesn't have an onmousewheel event
# if (typeof (this.get_optionListControl().onmousewheel) === 'undefined') {
#
# this.get_optionListControl()._thisPrototype = this;
# if (typeof (document.ajax__combobox_prototypes) === 'undefined') {
# document.ajax__combobox_prototypes = new Array();
# }
# Array.add(document.ajax__combobox_prototypes, this);
#
# this.get_optionListControl().addEventListener('DOMMouseScroll', this._onListMouseWheel, false);
# document.addEventListener('DOMMouseScroll', this._onDocumentMouseWheel, false);
# }
# .....
#
# _onDocumentMouseWheel: function(e) {
#
# // event is invoked by either 'this' prototype or the DOM document object
# var _this = this.ajax__combobox_prototypes;
# if (typeof (_this) === 'undefined') {
# _this = this;
# }
#
# // hide the option list when user mousewheel scrolls outside of it
# if (typeof (this.ajax__combobox_prototypes) === 'undefined') {
# this._popupBehavior.hide();
# }
# else {
# for (var i = 0; i < this.ajax__combobox_prototypes.length; i++) {
# this.ajax__combobox_prototypes[i]._popupBehavior.hide();
# }
# }
#
# return true;
#
# }

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>