Opened 14 months ago

Last modified 6 weeks ago

#15247 new bug

Disabled Selectmenus: calling refresh repeatedly makes it slower and slower

Reported by: Fearodin Owned by:
Priority: minor Milestone: none
Component: ui.selectmenu Version: 1.12.1
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by Ryan J Ollos)

Following up on case #15078:

The bug was fixed in the case above, but only for selectmenu's which are enabled.

The fix contains the creation of a new remove-eventhandler in the widget-function bindRemoveEvent().

Here, the _untrackClassesElement-Handler is added on-remove.

But the call misses the suppressDisabledCheck-Flag, which makes it useless for disabled selectmenus.

Changing the Call to the following, fixes the bug:

function bindRemoveEvent()
            {
                options.element.each(function (_, element)
                {
                    var isTracked = $.map(that.classesElementLookup, function (elements)
                    {
                        return elements;
                    })
                    .some(function (elements)
                    {
                        return elements.is(element);
                    });

                    if (!isTracked)
                    {
                        that._on(true, $(element), {
                            remove: "_untrackClassesElement"
                        });
                    }
                });
            }

Change History (3)

comment:1 Changed 7 weeks ago by Scott González

Component: ui.coreui.selectmenu

comment:2 Changed 7 weeks ago by Scott González

#15248 is a duplicate of this ticket.

comment:3 Changed 6 weeks ago by Ryan J Ollos

Description: modified (diff)
Note: See TracTickets for help on using tickets.