Fix selectable detection when using keys on TextBox

This commit is contained in:
Sasha Koshka 2024-07-26 20:48:44 -04:00
parent fad46eafd3
commit 9729e3dfda

View File

@ -290,7 +290,7 @@ func (this *textBox) runeUnderMouse () int {
func (this *textBox) handleKeyDown (key input.Key, numberPad bool) bool {
if this.box.handleKeyDown(key, numberPad) { return true }
if this.selectable { return false }
if !this.selectable { return false }
// because fuck you thats why!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
modifiers := this.Window().Modifiers()
@ -334,7 +334,7 @@ func (this *textBox) handleKeyDown (key input.Key, numberPad bool) bool {
func (this *textBox) handleKeyUp (key input.Key, numberPad bool) bool {
if this.box.handleKeyUp(key, numberPad) { return true }
if this.selectable { return false }
if !this.selectable { return false }
modifiers := this.Window().Modifiers()
switch {