From 89496dadf04df0f31b5aabb5b738479e1ae43636 Mon Sep 17 00:00:00 2001 From: Jani Koskela Date: Wed, 25 Feb 2015 17:03:37 +0200 Subject: [PATCH] prevent touch scroll from bubbling --- src/dist/select.js | 7 +++++++ src/dist/select.min.js | 2 +- src/dist/select.min.js.gz | Bin 8422 -> 8457 bytes src/select/elements/widget/WidgetWrapper.js | 7 +++++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/dist/select.js b/src/dist/select.js index 4d29f43..2e2695a 100644 --- a/src/dist/select.js +++ b/src/dist/select.js @@ -1422,6 +1422,8 @@ SELECT.ELEMENTS.WIDGET.SubWrapper.prototype = Object.create(SELECT.ELEMENTS.Elem }); this.element.addEventListener("keyup", onKeyUp.bind(this)); this.element.addEventListener("keydown", onKeyDown.bind(this)); + this.element.addEventListener("touchmove", touchScroll.bind(this)); + this.element.addEventListener("scroll", touchScroll.bind(this)); var widgetSubWrapper = Facade.subscribe("WidgetSubWrapper", new SELECT.ELEMENTS.WIDGET.SubWrapper(Facade)); var widgetSubWrapperElem = widgetSubWrapper.render(); @@ -1446,6 +1448,11 @@ SELECT.ELEMENTS.WIDGET.SubWrapper.prototype = Object.create(SELECT.ELEMENTS.Elem this.element.setAttribute("tabindex", this.tabIndex); } + function touchScroll(e) { + e.stopPropagation(); + return false; + } + function onKeyDown(e) { if (this.locked === true) return; diff --git a/src/dist/select.min.js b/src/dist/select.min.js index 4d49738..6ad1dda 100644 --- a/src/dist/select.min.js +++ b/src/dist/select.min.js @@ -1,2 +1,2 @@ (function($){var SEARCH_MODES={};SEARCH_MODES.BY_FIRST_KEY="firstKey";var KEY_CODES={};KEY_CODES.UP=38;KEY_CODES.DOWN=40;KEY_CODES.ENTER=13;var SORT_TYPES={};SORT_TYPES.ASC="asc";SORT_TYPES.DESC="desc";var SELECT={};SELECT.CONFIG={};SELECT.UTILS={};SELECT.HELPERS={};SELECT.SETTINGS={};SELECT.ELEMENTS={};SELECT.ELEMENTS.WIDGET={};SELECT.ELEMENTS.WIDGET.VALUE_CONTAINER={};SELECT.ELEMENTS.WIDGET.ARROW_CONTAINER={};SELECT.ELEMENTS.WIDGET.OPTIONS_MENU={};SELECT.ELEMENTS.WIDGET.LOADING_OVERLAY={};SELECT.ELEMENTS.NATIVE_SELECT={};SELECT.EXCEPTIONS={};var MUTATION_OBSERVER=window.MutationObserver||window.WebKitMutationObserver;var ALLOWED_TARGET_ELEMENT_TAG_NAME_SELECT="select";Select=function(userDefinedSettings){var Facade=new SELECT.Facade;var that=this;init();function init(){if(typeof userDefinedSettings!=="object")throw new SELECT.EXCEPTIONS.InvalidOptionsErrorException;if(userDefinedSettings.el instanceof jQuery)userDefinedSettings.el=$(userDefinedSettings.el)[0];Facade.subscribe("UserDefinedSettings",userDefinedSettings);Facade.subscribe("Wrapper",new SELECT.ELEMENTS.Wrapper(Facade))}this.attach=function(){Facade.publish("Wrapper:render");return this};this.hide=function(){Facade.publish("Wrapper:hide");return this};this.show=function(){Facade.publish("Wrapper:show");return this};this.detach=function(){Facade.publish("Wrapper:detach");return this};this.disable=function(){Facade.publish("Wrapper:disable");return this};this.enable=function(){Facade.publish("Wrapper:enable");return this};this.toggleLoadingMode=function(){Facade.publish("Wrapper:toggleLoadingMode");return this};this.toggleInputSearch=function(){Facade.publish("OptionsMenu:toggleInputSearch");return this}};SELECT.CONFIG.CONSTRUCTOR_PARAMS_URL="https://github.com/janikoskela/Select#constructor-parameters";SELECT.ELEMENTS.Element=function(){};SELECT.ELEMENTS.Element.prototype.hide=function(){this.element.hide()};SELECT.ELEMENTS.Element.prototype.show=function(){this.element.show()};SELECT.ELEMENTS.Element.prototype.getElement=function(){return this.element};SELECT.ELEMENTS.Element.prototype.focus=function(){return this.element.focus()};SELECT.ELEMENTS.Element.prototype.blur=function(){return this.element.blur()};SELECT.ELEMENTS.Element.prototype.getClass=function(){return this.element.className()};SELECT.ELEMENTS.Element.prototype.getWidth=function(){return this.element.offsetWidth};SELECT.ELEMENTS.Element.prototype.isHidden=function(){return this.element.isHidden()};SELECT.ELEMENTS.Element.prototype.disable=function(){this.element.setAttribute("disabled",true)};SELECT.ELEMENTS.Element.prototype.enable=function(){this.element.removeAttribute("disabled")};SELECT.ELEMENTS.Element.prototype.isDisabled=function(){return this.element.isDisabled()};SELECT.ELEMENTS.Element.prototype.getTabIndex=function(){return this.element.getAttribute("tabindex")};SELECT.ELEMENTS.Element.prototype.setSelectedIndex=function(index){this.element.selectedIndex=index};SELECT.ELEMENTS.Element.prototype.empty=function(){this.element.removeChildren()};SELECT.ELEMENTS.Element.prototype.hasChildren=function(){return this.element.getChildren().length>0};SELECT.ELEMENTS.Element.prototype.disableTabNavigation=function(){this.element.setAttribute("tabindex","-1")};SELECT.ELEMENTS.NATIVE_SELECT.NativeSelectBox=function(Facade,el){var that=this;var userDefinedSettings=Facade.publish("UserDefinedSettings");this.optionItems=[];this.observer;this.element=el;this.usePolling=userDefinedSettings.usePolling||false;this.pollingInterval=userDefinedSettings.pollingInterval||100;this.isElemHidden;this.isElemDisabled;this.optionsCount;this.attach=function(){this.optionItems=[];var optionsLength=this.element.options.length;this.optionsCount=optionsLength;for(var i=0;i0||removedNodesLength.length>0){that.attach();Facade.publish("OptionsMenuList").refresh()}})});var config={attributes:true,childList:true,characterData:false,subtree:false,attributeOldValue:false,attributeFilter:[],characterDataOldValue:false};that.observer.observe(that.element,config)}this.setSelectedOption=function(value){for(var i=0;ih){this.element.addClass("options-container-up");this.element.setStyle("top",h*-1)}else{this.element.addClass("options-container-down")}this.element.show();Facade.publish("ArrowContainerContent").up();if(this.useSearchInput===true)Facade.publish("OptionsMenuSearchInput:focus")};this.toggle=function(){if(this.element.isHidden())this.show();else this.hide()};this.toggleInputSearch=function(){if(this.useSearchInput===true){this.useSearchInput=false;Facade.publish("OptionsMenuSearchWrapper:hide")}else{if(this.optionsMenuSearchWrapper!==undefined)Facade.publish("OptionsMenuSearchWrapper:show");else{renderOptionsMenuSearchWrapper()}this.useSearchInput=true}}};SELECT.ELEMENTS.WIDGET.OPTIONS_MENU.OptionsMenu.prototype=Object.create(SELECT.ELEMENTS.Element.prototype);SELECT.ELEMENTS.WIDGET.OPTIONS_MENU.OptionsMenuItem=function(Facade,nativeSelectOption,index){var that=this;this.nativeSelectOption=nativeSelectOption;this.selected=nativeSelectOption.isSelected();this.type="li";this.element;this.itemValue;this.className="options-container-list-item";this.index=index;this.render=function(){this.itemValue=new SELECT.ELEMENTS.WIDGET.OPTIONS_MENU.OptionsMenuItemValue(Facade,nativeSelectOption);var childElem=this.itemValue.render();this.element=SELECT.UTILS.createElement(this.type,this.className);this.element.addEventListener("click",onClick.bind(this));this.element.addEventListener("mouseover",onMouseOver.bind(this));this.element.addEventListener("keyup",onKeyUp.bind(this));this.element.setDataAttribute("value",nativeSelectOption.getValue());this.element.setDataAttribute("index",this.index);var imageUrl=this.nativeSelectOption.getImageUrl();if(imageUrl!==undefined&&imageUrl!==null){this.itemImage=new SELECT.ELEMENTS.WIDGET.OPTIONS_MENU.OptionsMenuItemImage(Facade,imageUrl);var elem=this.itemImage.render();this.element.appendChild(elem)}this.element.appendChild(childElem);var description=this.nativeSelectOption.getDescription();if(description!==undefined&&description!==null){this.optionsMenuItemDescription=new SELECT.ELEMENTS.WIDGET.OPTIONS_MENU.OptionsMenuItemDescription(Facade,description);var optionsMenuItemDescriptionElem=this.optionsMenuItemDescription.render();this.element.appendChild(optionsMenuItemDescriptionElem)}if(this.selected===true)this.setInitialSelected();return this.element};this.getNativeSelectOption=function(){return this.nativeSelectOption};this.getValue=function(){return this.nativeSelectOption.getValue()};this.getWidth=function(){return this.element.offsetWidth};this.getText=function(){return this.nativeSelectOption.getText()};this.isHovered=function(){return this.element.hasClass("hovered")};this.isSelected=function(){return this.element.hasClass("selected")};this.setHovered=function(){this.element.addClass("hovered")};this.setInitialSelected=function(){Facade.publish("OptionsMenuList:clearSelected");this.element.addClass("selected");Facade.publish("ValueContainer:refresh")};this.setSelected=function(){Facade.publish("OptionsMenuList:clearSelected");this.nativeSelectOption.setSelected();this.element.addClass("selected");Facade.publish("ValueContainer:refresh")};this.getNextSibling=function(){return this.element.getNextSibling()};this.removeSelected=function(){this.element.removeClass("selected")};this.getOptionGroup=function(){return this.element.parentNode.parentNode};this.getParentElement=function(){return this.element.parentNode};this.removeHovered=function(){this.element.removeClass("hovered")};function onKeyUp(e){switch(e.keyCode){case KEY_CODES.ENTER:break}}this.getIndex=function(){return parseInt(this.element.getDataAttribute("index"))};function onMouseOver(e){Facade.publish("OptionsMenuList:clearOptionItemHovers");this.element.addClass("hovered")}function onClick(e){var optionsMenuList=Facade.publish("OptionsMenuList");var prevSelected=optionsMenuList.getSelectedOption();if(prevSelected===undefined){this.setSelected()}else if(prevSelected.getIndex()!==this.getIndex()){this.setSelected()}Facade.publish("OptionsMenu:hide")}};SELECT.ELEMENTS.WIDGET.OPTIONS_MENU.OptionsMenuItem.prototype=Object.create(SELECT.ELEMENTS.Element.prototype);SELECT.ELEMENTS.WIDGET.OPTIONS_MENU.OptionsMenuItemDescription=function(Facade,description){this.type="div";this.description=description;this.className="options-container-list-item-description";this.element;this.render=function(){this.element=new SELECT.UTILS.createElement(this.type,this.className);this.textNode=document.createTextNode(this.description);this.element.appendChild(this.textNode);return this.element}};SELECT.ELEMENTS.WIDGET.OPTIONS_MENU.OptionsMenuItemDescription.prototype=Object.create(SELECT.ELEMENTS.Element.prototype);SELECT.ELEMENTS.WIDGET.OPTIONS_MENU.OptionsMenuItemImage=function(Facade,imageUrl){this.type="img";this.imageUrl=imageUrl;this.element;this.render=function(){this.element=new SELECT.UTILS.createElement(this.type);this.element.setAttribute("src",this.imageUrl);return this.element}};SELECT.ELEMENTS.WIDGET.OPTIONS_MENU.OptionsMenuItemImage.prototype=Object.create(SELECT.ELEMENTS.Element.prototype);SELECT.ELEMENTS.WIDGET.OPTIONS_MENU.OptionsMenuItemValue=function(Facade,option){this.option=option;this.type="span";this.element;this.textNode;this.render=function(){this.element=document.createElement(this.type);this.textNode=document.createTextNode(this.option.getText());this.element.appendChild(this.textNode);return this.element}};SELECT.ELEMENTS.WIDGET.OPTIONS_MENU.OptionsMenuItemValue.prototype=Object.create(SELECT.ELEMENTS.Element.prototype);SELECT.ELEMENTS.WIDGET.OPTIONS_MENU.OptionsMenuList=function(Facade){var userDefinedSettings=Facade.publish("UserDefinedSettings");var that=this;this.type="ul";this.className="options-container-list";this.element;this.height=undefined;this.optionItems=[];this.sortType=userDefinedSettings.sort;this.inputSearchEnabled=false;this.optionGroups={};this.render=function(){this.element=SELECT.UTILS.createElement(this.type,this.className);this.refresh();this.element.addEventListener("mousewheel",preventScrollEventFromBubbling.bind(this));this.element.addEventListener("DOMMouseScroll",preventScrollEventFromBubbling.bind(this));return this.element};function preventScrollEventFromBubbling(e){var scrollingSpeed=30;var event=e.originalEvent;var d=e.wheelDelta||-event.detail;this.element.scrollTop+=(d<0?1:-1)*scrollingSpeed;e.preventDefault();e.stopPropagation();return false}this.refresh=function(){var options=Facade.publish("NativeSelectBox").getOptions();switch(this.sortType){case"asc":options.sort(sortByAsc);break;case"desc":options.sort(sortByDesc);break}renderOptionItems(options);Facade.publish("ValueContainer").refresh()};function renderOptionItems(options){that.optionItems=[];that.optionGroups={};that.element.removeChildren();var l=options.length;for(var i=0;ib)return 1;if(ab)return-1;if(a=i)return that.optionItems[i-1];return that.optionItems[that.optionItems.length-1]}this.hoverPreviousOption=function(){var optionsMenu=Facade.publish("OptionsMenu");if(optionsMenu.isLocked())return;var hovered=this.getHoveredOption();var option;if(hovered===undefined){var selected=this.getSelectedOption();if(selected!==undefined)option=getPreviousOption(selected)}else option=getPreviousOption(hovered);if(option===undefined)option=this.optionItems[this.optionItems.length-1];this.clearOptionItemHovers();option.setHovered();if(optionsMenu.isHidden())option.setSelected();else this.element.scrollTop=option.getElement().offsetTop};this.hoverFirstOption=function(){this.clearOptionItemHovers();var children=this.element.getChildren();var firstChild=children[0];if(firstChild.hasClass("options-container-list-item")){firstChild.addClass("hovered")}else{var f=firstChild.getChildren();var b=f[1].getChildren();b[0].addClass("hovered")}this.element.scrollTop=0;Facade.publish("WidgetWrapper:focus")};this.hoverNextOption=function(){var optionsMenu=Facade.publish("OptionsMenu");if(optionsMenu.isLocked())return;var hovered=this.getHoveredOption();var option;if(hovered===undefined){var selected=this.getSelectedOption();if(selected!==undefined)option=getNextOption(selected)}else option=getNextOption(hovered);if(option===undefined)option=this.optionItems[0];this.clearOptionItemHovers();option.setHovered();if(optionsMenu.isHidden()){option.setSelected()}else{this.element.scrollTop=option.getElement().offsetTop-Facade.publish("OptionsMenuSearchWrapper:getHeight")}};this.selectHoveredOption=function(){var optionsMenu=Facade.publish("OptionsMenu");if(optionsMenu.isLocked())return;var hovered=this.getHoveredOption();if(hovered!==undefined)hovered.setSelected();Facade.publish("OptionsMenu:hide")};function findOptionByFirstCharFromStart(firstChar){var optionsMenu=Facade.publish("OptionsMenu");var optionItemsCount=that.optionItems.length;for(var i=0;i-1){matchedOptions.push(option)}}renderOptionItems(matchedOptions);if(matchedOptions.length===0)optionsMenu.onNoOptionsFound();else optionsMenu.onOptionsFound()};this.searchByFirstChar=function(firstChar){var optionsMenu=Facade.publish("OptionsMenu");if(optionsMenu.isLocked())return;var hovered=this.getHoveredOption();var optionItemsCount=this.optionItems.length;if(hovered===undefined){findOptionByFirstCharFromStart(firstChar)}else{var hoveredText=hovered.getText().toLowerCase();var hoveredIndex=hovered.getIndex();for(var i=hoveredIndex+1;i or ",htmlMessage:"Error detected",toString:function(){return this.name+": "+this.message}}};SELECT.Facade=function(){this.subscribe=function(name,instance){this[name]=instance;return instance};this.publish=function(name,args){var parts=name.split(":");if(parts.length>1){var instance=this[parts[0]];if(instance!==undefined){var func=instance[parts[1]];if(typeof func==="function")return func.call(instance,args)}}return this[name]}};SELECT.HELPERS.getOptionByValue=function(options,value){for(var i=0;i0)return false;if(obj.length===0)return true;for(var key in obj){if(hasOwnProperty.call(obj,key))return false}return true}})(jQuery||{}); \ No newline at end of file +if(imageUrl===undefined||imageUrl===null)valueContainerImage.hide();else valueContainerImage.setImageUrl(imageUrl);var valueContainerText=Facade.subscribe("ValueContainerText",new SELECT.ELEMENTS.WIDGET.VALUE_CONTAINER.ValueContainerText(Facade));var valueContainerTextElem=valueContainerText.render();this.element.appendChild(valueContainerTextElem);return this.element};this.refresh=function(){Facade.publish("ValueContainerText").refresh();var imageUrl=Facade.publish("NativeSelectBox").getSelectedOptionImageUrl();if(imageUrl!==undefined&&imageUrl!==null){Facade.publish("ValueContainerImage").setImageUrl(imageUrl);Facade.publish("ValueContainerImage").show()}else Facade.publish("ValueContainerImage").hide()};this.enableLoadingMode=function(){Facade.publish("ValueContainerText").setText(this.loadingText);enableDotDotDotInterval()};function enableDotDotDotInterval(){var dots=".";that.timeInterval=setInterval(function(){if(dots.length===3)dots=".";else dots+=".";Facade.publish("ValueContainerText").setText(that.loadingText+dots)},500)}this.disableLoadingMode=function(){clearInterval(this.timeInterval);Facade.publish("ValueContainerText").refresh()}};SELECT.ELEMENTS.WIDGET.VALUE_CONTAINER.ValueContainer.prototype=Object.create(SELECT.ELEMENTS.Element.prototype);SELECT.ELEMENTS.WIDGET.VALUE_CONTAINER.ValueContainerImage=function(Facade){this.type="img";this.imageUrl;this.element;this.render=function(){this.element=SELECT.UTILS.createElement(this.type);return this.element};this.setImageUrl=function(imageUrl){this.imageUrl=imageUrl;this.element.setAttribute("src",this.imageUrl)};this.show=function(){this.element.setStyle("display","inline-block")}};SELECT.ELEMENTS.WIDGET.VALUE_CONTAINER.ValueContainerImage.prototype=Object.create(SELECT.ELEMENTS.Element.prototype);SELECT.ELEMENTS.WIDGET.VALUE_CONTAINER.ValueContainerText=function(Facade){var userDefinedSettings=Facade.publish("UserDefinedSettings");var that=this;this.type="span";this.className="value-container-text";this.element;this.placeholder=userDefinedSettings.placeholder;this.render=function(){this.element=SELECT.UTILS.createElement(this.type,this.className);this.refresh();return this.element};this.refresh=function(){var text=Facade.publish("NativeSelectBox").getSelectedOptionText();if(text===undefined||text===null&&this.placeholder!==undefined)this.setText(this.placeholder);else if(text.length===0&&this.placeholder!==undefined)this.setText(this.placeholder);else this.setText(text)};this.setPlaceholder=function(placeholder){this.placeholder=placeholder;this.element.innerHTML=this.placeholder};this.setText=function(text){this.text=text;this.element.innerHTML=text}};SELECT.ELEMENTS.WIDGET.VALUE_CONTAINER.ValueContainerText.prototype=Object.create(SELECT.ELEMENTS.Element.prototype);SELECT.ELEMENTS.WIDGET.SubWrapper=function(Facade){var userDefinedSettings=Facade.publish("UserDefinedSettings");var ORIENTATION_LEFT="left";var ORIENTATION_RIGHT="right";this.type="div";this.className="widget-sub-wrapper";this.orientation=userDefinedSettings.orientation||"right";this.element;this.locked=false;this.render=function(){this.element=SELECT.UTILS.createElement(this.type,this.className);this.element.addEventListener("click",onClick.bind(this));var arrowContainer=Facade.subscribe("ArrowContainer",new SELECT.ELEMENTS.WIDGET.ARROW_CONTAINER.ArrowContainer(Facade));var arrowContainerElem=arrowContainer.render();var valueContainer=Facade.subscribe("ValueContainer",new SELECT.ELEMENTS.WIDGET.VALUE_CONTAINER.ValueContainer(Facade));var valueContainerElem=valueContainer.render();switch(this.orientation){case ORIENTATION_LEFT:this.element.appendChild(arrowContainerElem);arrowContainerElem.setStyle("float",this.orientation);this.element.appendChild(valueContainerElem);break;case ORIENTATION_RIGHT:this.element.appendChild(valueContainerElem);this.element.appendChild(arrowContainerElem);arrowContainerElem.setStyle("float",this.orientation);break;default:throw Error('Invalid orientation value "'+this.orientation+'"')}return this.element};this.lock=function(){this.locked=true};this.unLock=function(){this.locked=false};function onClick(e){if(this.locked===true)return;var nativeSelectBox=Facade.publish("NativeSelectBox");if(nativeSelectBox.isDisabled()===false)Facade.publish("OptionsMenu").toggle()}};SELECT.ELEMENTS.WIDGET.SubWrapper.prototype=Object.create(SELECT.ELEMENTS.Element.prototype);SELECT.ELEMENTS.WIDGET.Wrapper=function(Facade){var userDefinedSettings=Facade.publish("UserDefinedSettings");this.type="div";this.className="widget-wrapper";this.element;this.tabIndex=Facade.publish("NativeSelectBox").getTabIndex()||0;this.closeWhenCursorOut=userDefinedSettings.closeWhenCursorOut||true;this.locked=false;this.render=function(){this.element=SELECT.UTILS.createElement(this.type,this.className);this.element.setAttribute("tabindex",this.tabIndex);if(userDefinedSettings.closeWhenCursorOut===true){this.element.addEventListener("mouseleave",function(e){Facade.publish("OptionsMenu:hide")})}document.addEventListener("click",function(e){Facade.publish("OptionsMenu:hide")});this.element.addEventListener("click",function(e){e.stopPropagation()});this.element.addEventListener("keyup",onKeyUp.bind(this));this.element.addEventListener("keydown",onKeyDown.bind(this));this.element.addEventListener("touchmove",touchScroll.bind(this));this.element.addEventListener("scroll",touchScroll.bind(this));var widgetSubWrapper=Facade.subscribe("WidgetSubWrapper",new SELECT.ELEMENTS.WIDGET.SubWrapper(Facade));var widgetSubWrapperElem=widgetSubWrapper.render();this.element.appendChild(widgetSubWrapperElem);var optionsMenu=Facade.subscribe("OptionsMenu",new SELECT.ELEMENTS.WIDGET.OPTIONS_MENU.OptionsMenu(Facade));var optionsMenuElem=optionsMenu.render();this.element.appendChild(optionsMenuElem);return this.element};this.lock=function(){this.locked=true};this.unLock=function(){this.locked=false};this.enableTabNavigation=function(){this.element.setAttribute("tabindex",this.tabIndex)};function touchScroll(e){e.stopPropagation();return false}function onKeyDown(e){if(this.locked===true)return;switch(e.keyCode){case KEY_CODES.UP:case KEY_CODES.DOWN:e.preventDefault();e.stopPropagation();break}return false}function onKeyUp(e){if(this.locked===true)return false;switch(e.keyCode){case KEY_CODES.UP:Facade.publish("OptionsMenuList").hoverPreviousOption();break;case KEY_CODES.DOWN:Facade.publish("OptionsMenuList").hoverNextOption();break;case KEY_CODES.ENTER:Facade.publish("OptionsMenuList").selectHoveredOption();break;default:var firstChar=String.fromCharCode(e.which)[0].toLowerCase();Facade.publish("OptionsMenuList").searchByFirstChar(firstChar)}e.stopPropagation();e.preventDefault();return false}function onMouseLeave(e){Facade.publish("OptionsMenu:hide")}this.setTabIndex=function(tabIndex){this.tabIndex=tabIndex;this.element.setAttribute("tabindex",tabIndex)}};SELECT.ELEMENTS.WIDGET.Wrapper.prototype=Object.create(SELECT.ELEMENTS.Element.prototype);SELECT.ELEMENTS.Wrapper=function(Facade){var userDefinedSettings=Facade.publish("UserDefinedSettings");var that=this;this.type="div";this.className=userDefinedSettings.theme||"default";this.commonClassName="select-widget";this.width=userDefinedSettings.width;this.widgetWrapper;this.element;this.el=userDefinedSettings.el;this.loadingMode=false;this.render=function(){this.element=SELECT.UTILS.createElement(this.type,this.className+" "+this.commonClassName);var tagName=this.el.tagName.toLowerCase();switch(tagName){case ALLOWED_TARGET_ELEMENT_TAG_NAME_SELECT:var parentsParent=this.el.parentNode;var instance=new SELECT.ELEMENTS.NATIVE_SELECT.NativeSelectBox(Facade,this.el);Facade.subscribe("NativeSelectBox",instance).attach();if(instance.isDisabled())this.disable();parentsParent.insertBefore(this.element,this.el);this.element.appendChild(this.el);var nativeSelectBoxWrapper=new SELECT.ELEMENTS.NATIVE_SELECT.NativeSelectBoxWrapper(Facade);var nativeSelectBoxWrapperEl=nativeSelectBoxWrapper.render();this.el.parentNode.replaceChild(nativeSelectBoxWrapperEl,this.el);nativeSelectBoxWrapperEl.appendChild(this.el);this.element.appendChild(nativeSelectBoxWrapperEl);break;default:throw new SELECT.EXCEPTIONS.InvalidTargetElementErrorException}renderWidget();if(this.width!==undefined){this.setWidth(this.width);if(userDefinedSettings.optionMenuWidth===undefined)Facade.publish("OptionsMenu").setWidth(this.width)}else{var width=Facade.publish("OptionsMenu").getWidth();this.setWidth(width)}return this.element};function renderWidget(){var widgetWrapperInstance=Facade.subscribe("WidgetWrapper",new SELECT.ELEMENTS.WIDGET.Wrapper(Facade));var widgetWrapperElem=widgetWrapperInstance.render();that.element.appendChild(widgetWrapperElem);Facade.publish("OptionsMenu").hide()}this.getWidth=function(){return this.width};this.toggleLoadingMode=function(){if(this.loadingMode===false)this.enableLoadingMode();else this.disableLoadingMode()};this.enableLoadingMode=function(){this.loadingMode=true;Facade.publish("OptionsMenu:lock");Facade.publish("ValueContainer:enableLoadingMode");Facade.publish("WidgetWrapper:lock");Facade.publish("WidgetSubWrapper:lock");Facade.publish("ValueContainerImage:hide")};this.disableLoadingMode=function(){this.loadingMode=false;Facade.publish("OptionsMenu:unLock");Facade.publish("ValueContainer:disableLoadingMode");Facade.publish("WidgetWrapper:unLock");Facade.publish("WidgetSubWrapper:unLock");Facade.publish("ValueContainerImage:show")};this.show=function(){this.element.show()};this.hide=function(){this.element.hide()};this.enable=function(){this.element.removeAttribute("disabled");Facade.publish("WidgetWrapper:unLock");Facade.publish("WidgetSubWrapper:unLock");Facade.publish("OptionsMenu:unLock");Facade.publish("WidgetWrapper:enableTabNavigation")};this.disable=function(){this.element.setAttribute("disabled",true);Facade.publish("WidgetWrapper:lock");Facade.publish("WidgetSubWrapper:lock");Facade.publish("OptionsMenu:lock");Facade.publish("WidgetWrapper:disableTabNavigation")};this.setWidth=function(width){this.width=width;this.element.setStyle("width",this.width)};this.detach=function(){Facade.publish("NativeSelectBox:detach");var parent=this.element.parentNode;parent.insertBefore(this.el,this.element);this.element.remove()}};SELECT.ELEMENTS.Wrapper.prototype=Object.create(SELECT.ELEMENTS.Element.prototype);SELECT.EXCEPTIONS.InvalidOptionsErrorException=function(){return{name:"Invalid options object",level:"Show Stopper",message:"options should be in object form with required key-value pairs. See the required key-value pairs from "+SELECT.CONFIG.CONSTRUCTOR_PARAMS_URL,htmlMessage:"Error detected",toString:function(){return this.name+": "+this.message}}};SELECT.EXCEPTIONS.InvalidTargetElementErrorException=function(){return{name:"Invalid target element",level:"Show Stopper",message:"el should be ",htmlMessage:"Error detected",toString:function(){return this.name+": "+this.message}}};SELECT.Facade=function(){this.subscribe=function(name,instance){this[name]=instance;return instance};this.publish=function(name,args){var parts=name.split(":");if(parts.length>1){var instance=this[parts[0]];if(instance!==undefined){var func=instance[parts[1]];if(typeof func==="function")return func.call(instance,args)}}return this[name]}};SELECT.HELPERS.getOptionByValue=function(options,value){for(var i=0;i0)return false;if(obj.length===0)return true;for(var key in obj){if(hasOwnProperty.call(obj,key))return false}return true}})(jQuery||{}); \ No newline at end of file diff --git a/src/dist/select.min.js.gz b/src/dist/select.min.js.gz index 34c58511cf28bee9dc70ed215f77c9a872afce3e..16e53639f6ac10486361c174e6c46ebbf569bab9 100644 GIT binary patch literal 8457 zcmV+kA@<%MiwFQRIMqyo5}co}Imdc6ZT`?xqF^3t@Vv z`uZr77~*adXKe?D3i;np(vz&GFWaGkzO5rQHI413C+X?wed$Tcqa+#?-K%)o{gVIb zaelpC@0Xu{Zqa}L{>$IkzrCN}x!2ox`Lg%-UTfp0pa1^yo1E z-#*^?aCR`*?VkjT4)<53g z{@n(7xINtat$$_^uK&-SK2$b>b~UYtZ>R!ufOEe@jTeA6hXq1VJX{pVzOe7Z9n9G@L+A8#L= zoSh!;2i~M8X8GoiKVHVgWPaWqrB^>9b^ap=kN+HzYKv?>D$;Cy7G~j9R76?s86vTt zL|4(Yz@0GVCI{-yvb0F4%rJNshK_^Lk8QsR8l7_$H1uOLG?!6f=?5aNz}W=ZMLL@2 zHFyB1S>w)=c~*yx!ZhycP7>y|4IELRLo)1*(SD4_#iR~xdU26+&?ac({6jn*N7FjA z0S(*O9G?M%d$gm&4bSML;$l z#bJ29M>NeJb*L{D8WrJrOiMNE0HH5PnP{xl#gG`Ifk7EWqcOOe6}L4*urrC1an_V= zCSfiLG@y>e-A$tDWiff(TY)#pFdT;0@g*|`8!~D+2pw;I!!{C%`Pw}sxUVA^h_@*k z1W-a9Vk0e7JCHtEY@tBcS~erf2kn&!k!nZJ}=jq70Jp5rc=3XxVQ zo=9y5DQwgc@VKmB<5omu?zO5thb6REC9q9bLA~NxZMAr-w7WzpOQ|@Vt(UGuWe0?> zutbv=W@FXdB~8Gvq9gd7A|liYZU~lk>2=y1g#9=tzBbWp7gF-=m)1hF zbSb@jsB<^H60r!z)L|i+n#u_y&>>@FS3H)HcSH$)QNAMU=liH@85w$sJG4V(oH)1+vyI~P-GVR#O=jTNhMf|B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{gAJ^)UTVqasw&$ZP`MPY~Ou>3b$+)?hRA8T%JQnVnnOAlFRcV}o2$X#Gjv?amGYr;RWPg;Y~%d4xTAjujUAuHh& zFRTa1>m&3^GW{x|l2U#n_n;BlLM$`P3x-#fn2Z4nO`V~O7 zT7~UT|G)>@-rX%%;m)6)f6u??-}CSJ_xyYQJ^!A6&%fv2^Y8ih{CoaA{~rDKztymi IZ~({v09~+R6aWAK diff --git a/src/select/elements/widget/WidgetWrapper.js b/src/select/elements/widget/WidgetWrapper.js index 047b6c3..1cf339b 100644 --- a/src/select/elements/widget/WidgetWrapper.js +++ b/src/select/elements/widget/WidgetWrapper.js @@ -30,6 +30,8 @@ SELECT.ELEMENTS.WIDGET.Wrapper = function(Facade) { }); this.element.addEventListener("keyup", onKeyUp.bind(this)); this.element.addEventListener("keydown", onKeyDown.bind(this)); + this.element.addEventListener("touchmove", touchScroll.bind(this)); + this.element.addEventListener("scroll", touchScroll.bind(this)); var widgetSubWrapper = Facade.subscribe("WidgetSubWrapper", new SELECT.ELEMENTS.WIDGET.SubWrapper(Facade)); var widgetSubWrapperElem = widgetSubWrapper.render(); @@ -54,6 +56,11 @@ SELECT.ELEMENTS.WIDGET.Wrapper = function(Facade) { this.element.setAttribute("tabindex", this.tabIndex); } + function touchScroll(e) { + e.stopPropagation(); + return false; + } + function onKeyDown(e) { if (this.locked === true) return;