Fomantic-UI icon indicating copy to clipboard operation
Fomantic-UI copied to clipboard

[Popup] CSS-only popups don't have a maximum width

Open donaggio opened this issue 5 years ago • 2 comments

Bug Report

CSS-only popups (built using only the data-tooltip attribute without any javascript initialization) don't seem to have a maximum width set, so long tooltip text rapidly overflow the container width.

Steps to reproduce

Add a CSS-only popup using the data-tooltip attribute with a container element:

<span data-tooltip="Long tooltip text long tooltip text long tooltip text long tooltip text long tooltip text long tooltip text long tooltip text long tooltip text long tooltip text long tooltip text long tooltip text long tooltip text long tooltip text"> <i class="info icon"></i> </span>

Expected result

The resulting popup should have a limited with, just like javascript-initialized ones.

Actual result

Popup overflows page width.

Testcase

https://jsfiddle.net/k0qw3Lbe/

Version

2.8.7

donaggio avatar Jun 25 '21 11:06 donaggio

Add data-variation="fixed" See https://jsfiddle.net/lubber/b56gn89k/3/

It's also stated in the docs here https://fomantic-ui.com/modules/popup.html#width image

lubber-de avatar Jun 25 '21 11:06 lubber-de

Sorry @lubber-de, usually I read throughly the docs, but somehow this bit of popup knowledge slipped under my radar! Thanks for your help!

donaggio avatar Jun 25 '21 12:06 donaggio