fixed out of bounds coordinates crashing GUI for form fields

This commit is contained in:
Mikayla Fischler
2023-12-17 12:56:08 -05:00
parent 55ccdd63d4
commit f23b7e2c2f
3 changed files with 3 additions and 3 deletions

View File

@@ -45,7 +45,7 @@ local function text_field(args)
if core.events.was_clicked(event.type) then
e.take_focus()
if event.type == MOUSE_CLICK.UP then
if event.type == MOUSE_CLICK.UP and e.in_frame_bounds(event.current.x, event.current.y) then
ifield.move_cursor(event.current.x)
end
elseif event.type == MOUSE_CLICK.DOUBLE_CLICK then