Search code examples
javascriptangularbrowserangular7

Angular - freezes first tab until the another tab is fully loaded


we have a working app in Angular 7. Application speed pretty good but sometimes application screen is frozen like below scenarios;

I have one tab and there is also a button on the page. The purpose of this button is to open any page in a new tab. (with window.open(url, '_blank'))

I click the button to open the new tab. And then my first tab freezes until the new tab is fully loaded. I can't click on anything in the first tab. For example, I click the selectbox in the first tab. Then the selectbox does not open until the new tab is fully loaded.

A small note: Of course, this has nothing to do with the button and the window.open code. For example, I have two tab. I pressed to f5 for the second tab and I switched to the first tab. The same problem again. I can't click to anything in the first tab until the second tab is fully loaded.

Another small note: I've tried with Chrome, Firefox, Opera. And in they all have the same problem.

What could be the reason?


Solution

  • That's because the new window is opened in the same process with the opener window.

    window.open(url,'_blank','noopener')