Is there any web-standard definition for a "pop up"?

I would define a “pop up” as an HTML element in the highest z-index value possible, appearing above any other element some time after general parsing and rendering.

But that’s only my personal definion.
Is there any web-standard definition for a “pop up”?

The regular definition of popup appears to be a new smaller browser window that is opened by another one.

See https://developer.mozilla.org/en-US/docs/Web/API/Window/open

I don’t know if there is any formal definition of what you are saying. Although i think most people would also recognize that as a popup.

It’s a fairly overloaded term it would seem.

1 Like

I would more call it a tooltip

1 Like

Or a modal perhaps :slight_smile:

I think a modals requirement is to “Lock” all other windows and screens of the same application.

1 Like

Yes true. It’s usually bad practice to spawn multiple modals.

As @rpkamp said (and me being from a time when there was only new window pop ups to consider) I generally consider a ‘popup’ to be a new browser window rather than an html element so z-index is not a consideration there.

I think though these days that a popup is an interchangeable term used for anything that pops up with a dialog or message.

Hello PaulOB !

I am sorry, I didn’t understand this:

generally consider a ‘popup’ to be a new browser window rather than an html element so z-index is not a consideration there.

I especially didn’t understand “is not a consideration there”.

A new browsers window is created by the browser. You can’t apply css to it as it is controlled by the windowfeatures of the open() method as explained in the link from @rpkamp.

open(url, target, windowFeatures)

On the other hand CSS and html controlled elements that create in-page pop ups/modals/tooltips/messages etc are controlled by css and are affected by z-index.

I think that by the argument _blank we choose the new window to actually be a new tab.

If so, we could say that a pop can either be a new element, a new browser tab, or a whole new browser window.

No, not quite, target=_blank opens a new window by default. It’s only if the user has already specified in their own browser controls that any new windows should open in a tab otherwise they just spawn new windows as per normal.

Thank you for correcting my me.

I can say from my experience with various browsers, both on desktop and smartphone that intuitively I’d assume the default today to be a tab, in most cases.

Yes modern browsers probably do default to tab but I have no firm confirmation for this and of course the user can set what they prefer anyway. Target=_blank just means open a new window. The individual browser settings decide if that is a tab or not.

We never had tabs when I first started so a new window was always spawned. :slight_smile:

2 Likes

Yes, I recall this period as well.

1 Like

Hi @bendqh1, you might also have a look at the HTML dialog element:

The still considered experimental but supported by all major browsers… in case of doubt there are polyfills available though. Anyway you can control whether it should be modal or not, and it’s certainly less annoying than open another window. ^^

4 Likes