View Issue Details

IDProjectCategoryView StatusLast Update
0005426OXID eShop (all versions)3.2. HTML, CSS, JavaScriptpublic2023-12-13 15:45
Reporterleofonic Assigned To 
PriorityhighSeverityminorReproducibilityalways
Status acknowledgedResolutionopen 
Product Version4.8.0_5.1.0_beta1 
Summary0005426: oxDropDown causes Lag on clicks
DescriptionJavascript click perfomance degrades with every product with variants dropdown loaded. This is because oxdropdown attaches handler hideall to document object on click, these handlers are evaluated on every click anywhere. If you have a list with 100 products with variant dropdowns, you have 100 handlers on document object click, and reaction to any click is about one second delayed. This is especially citical if product lists are loaded with Ajax, because those handlers get more and more with every product list loaded.
Additional InformationPossible fix would be to hide the dropdown on mouseout:

            // clicking on drop down
            this.oxDropDown.click(function() {
                self.toggleDropDown();
            });

            // selecting value
            $( 'a', this.valueList ).click( function (){
                self.select( $(this) );
                return self.action();
            });

            // moving else where
            this.oxDropDown.mouseleave( function(){
                self.hideAll();
            });
TagsPerformance and Caching Rework
Attached Files
oxdropdown_events.jpg (178,466 bytes)   
oxdropdown_events.jpg (178,466 bytes)   
ThemeNot defined
BrowserAll
PHP VersionNot defined
Database VersionNot defined

Activities