Select2 dropdown search field losing focus and failing to initialize in high-concurrency mobile environments

Hi everyone,

I’m working on a project that heavily implements Select2 for dynamic search filtering, and while it works perfectly on desktop, I’ve run into a consistent UI bug when testing on mobile devices under heavy system-wide load.

I’ve noticed that whenever the local environment is under significant resource pressure—specifically when I’m running several background executors or testing the arceus roblox environment for its multi-threading capabilities—the Select2 dropdown search field becomes nearly impossible to use. The search box will briefly gain focus and then immediately blur, or the results list will fail to render entirely. While I was discussing these environmental bottlenecks with some other developers, we noticed that the mobile browser’s main thread seems to be deprioritizing the jQuery event delegation for the select2:open event when the CPU load hits a certain threshold during these high-concurrency tasks.

Has anyone else noticed that the dropdown becomes “unresponsive” or starts hitting silent DOM exception errors if there are other high-performance tasks running in the background? I’m also seeing occasional “stack overflow” errors in the console when the dropdownParent is set to a modal, which makes me think the positioning logic is struggling to calculate offsets during these resource spikes.

I’m trying to figure out if there’s a way to make the initialization more resilient—perhaps by delaying the search focus or using a more lightweight rendering adapter to ensure the UI remains fluid in “noisy” mobile environments. If you’ve dealt with stabilizing the Select2 experience on hardware that’s being pushed to its limits—or have tips on preventing these silent focus failures during heavy background processing—I’d really value your advice!

Best regards!