XUL: Allowing DIV text select inside XUL controls in Firefox

Needed to use a DIV tag to show some text in a Firefox extension. The problem was that Firefox extensions usually use XUL, not HTML, but we can use HTML controls and tags inside XUL. But the DIV was not behaving the same way as in HTML, regarding text selection.

To make text selection work inside XUL, I needed to use this (Mozilla) proprietary CSS style:

-moz-user-select: text;

Thanks to:

http://mattsnider.com/css/css-string-truncation-with-ellipsis/


This entry was posted in programming and tagged , , . Bookmark the permalink.

Leave a comment