Talk:OOUI/Widgets/Popups

About this board

Attaching popups to teleport target

1
Isaacl (talkcontribs)

As per phab:T348286, popups should be attached to the HTML element returned by OO.ui.getTeleportTarget(). Can the examples on this page be updated to show best practices using this API, instead of the current code that appends the popups to document.body ? I'm not sure if one of the following ways is recommended over the other: convert the teleport target to a jQuery object and append the jQuery object for the popup, or extract the first HTML element from the jQuery object for the popup and append it to the teleport target.

Reply to "Attaching popups to teleport target"
Inductiveload (talkcontribs)

Is it possible to destroy popups, rather than just toggle(false)?

It seems all my old popup are hanging about in the DOM when I will never use them again.

Reply to "Destroying popups"
Inductiveload (talkcontribs)

I have a OO.ui.PopupWidget that can be fairly long (depends on the content, which loads asynchronously).

I have autoFlip on, but it has to be really close to the bottom to flip (since the popup is almost empty at the start), and when it fills later, it doesn't re-flip.

Is there a way to either "reserve" space, so it will pre-emptively flip so that it would have at least "y" pixels, or is there a way to force it to flip if it gets too large?

Reply to "Space for popups"

Toggling Popup with hover event

3
Reinischmax (talkcontribs)

I know this must be possible, as its the default on Wikipedia links, but I've been digging through https://doc.wikimedia.org/oojs-ui/master/js/#!/api looking for an on hover event trigger, and I didn't see one. How can I make a button (or a link, doesn't really matter so long as it can redirect) that triggers a popup when you hover over it?

Jdforrester (WMF) (talkcontribs)
Volker E. (WMF) (talkcontribs)
Reply to "Toggling Popup with hover event"
Reinischmax (talkcontribs)

Hello, I made a browser extension for the internet archive that adds a link to cited books that includes a little detail popup. I am working to port this over as a gadget, but I am getting "Uncaught TypeError: Cannot read property 'PopupWidget' of undefined" when I call "OO.ui.PopupWidget({...})."

Jdforrester (WMF) (talkcontribs)
This post was hidden by Reinischmax (history)
Reply to "OO.ui is undefined"
There are no older topics
Return to "OOUI/Widgets/Popups" page.