You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Different window.open in an async call behaviour between Webpack 4 & Webpack 5 #18018
What is the current behavior?
Using the same React component we get different experiences when building with Webpack 4 & Webpack 5 on iOS devices
Clicking a button to open a new tab in an async call would only work when building with Webpack 4.
When building with Webpack 5 the new tab does not open when you click the button. The popup gets blocked.
Note: Clicking the button on Chrome/Firefox desktop works as expected (opens new tab) on both Webpack 4 & Webpack 5.
I understand that the code that triggers the new tab might not be the best but I'm really curious to understand why this works with Webpack 4 and doesn't with Webpack 5. And how come it only seems to affect Apple devices 🤔
If the current behavior is a bug, please provide the steps to reproduce.
changed the title [-]Different behaviour between Webpack 4 & Webpack 5[/-][+]Different window.open in an async call behaviour between Webpack 4 & Webpack 5[/+]on Jan 27, 2024
I am sure there are no problems with webpack, we don't override your code and don't change logic, maybe something with dev env, I will investigate it later
Activity
[-]Different behaviours between Webpack 4 & Webpack 5[/-][+]Different behaviour between Webpack 4 & Webpack 5[/+][-]Different behaviour between Webpack 4 & Webpack 5[/-][+]Different window.open in an async call behaviour between Webpack 4 & Webpack 5[/+]alexander-akait commentedon Jan 30, 2024
Please open the safari dev tools console and look at the output
samiashi commentedon Feb 5, 2024
@alexander-akait Sadly nothing pops out in the dev console
Attached is a video of running it under Webpack 5
https://github.com/webpack/webpack/assets/10187761/68303b9f-d0ab-4cf9-a740-7ecf1e7d271e
alexander-akait commentedon Feb 5, 2024
I am sure there are no problems with webpack, we don't override your code and don't change logic, maybe something with dev env, I will investigate it later
samiashi commentedon Feb 5, 2024
Many thanks @alexander-akait
I’m very keen to hear about your findings
just to note that I get the same issue when I build for production on version 5