Closed ascpial closed 1 month ago
Fixing this issue requires some more complex logic that's out of scope for PrimeUI. One of the design goals is for the code to be clearly understandable with little to no "hidden" logic, and another is to avoid any elements changing the behavior of others, which includes creating a view hierarchy (this is a primitive toolbox, not a full UI library!). I already hate that getWindowPos
has to exist, and I wish I could remove it entirely, but any sort of nesting would break otherwise; so expanding it any more just doesn't sit right with me. Feel free to keep it for your own use (and even share it with others!), but I don't plan on merging this.
When clickable elements are movable (for example when in a scrollbox), their "hitbox" don't move when the element move. Moreover, when the origin of the element is out of the screen, it becomes impossible to click them.
Here is a minimal demo of the issue:
This is opinionated, it increases the size of
util.lua
and idk if you will like it the way I did it.I also fixed a minor issue in
init.lua
.Documentation is missing, this is why this PR is marked as draft.