Skip to content

Commit

Permalink
selectable labels
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Sep 7, 2023
1 parent 6b846f0 commit 5b8fb05
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions haxe/ui/backend/TextDisplayImpl.hx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ class TextDisplayImpl extends TextBase {
measureTextRequired = true;
}

if (_displayData.selectable == true && element.style.userSelect != "text") {
element.style.userSelect = "text";
} else if (_displayData.selectable == false && element.style.userSelect != null) {
element.style.removeProperty("user-select");
element.style.userSelect = null;
}

if (_textStyle != null) {
if (element.style.textAlign != _textStyle.textAlign) {
element.style.textAlign = _textStyle.textAlign;
Expand Down

0 comments on commit 5b8fb05

Please sign in to comment.