When you want to see the replies of a certain tweet, you click the tweet to open a new window. This new window looks like a modal, but you are actually redirected to a new url to see the replies. And when you click outside the new window, it reverts back to the page you were on just like a normal modal. This technique is what I want to implement into my web chat application.
To do this, I thought I needed to use window.open something like the below.
window.open('new-url-for-replies', '_self');
But, this merely shows the redirected site on the same page and it doesn't show the new url in the search bar and doesn't look like a modal.
If you know the technique Twitter uses for this purpose, could you share your wisdom here?
Note: I want to know the Javascript way to do this.