So if I set an input as num|null, the "cancel" option shows up, but I can't press ok without any values set. So if I don't want to use the mouse to press cancel, and want just to skip the option by pressing enter, I'd have to at least type a '0'.
What I'd want is if you don't type anything and press ok, it'd count as null if the option is avaiable. If null isn't an option, maybe count it as a 0.
ID:2424801
Jan 27 2019, 6:21 pm
|
|||||||||||||
| |||||||||||||
Jan 29 2019, 7:09 am
|
|
Then you need to set a default value. If you do that, you'll have something to hit OK on.
|
I think they are trying to say that if you specify null as a valid option, than null should be allowed for ok.
But really they just need to know that ESC counts for cancel so that they don't have to rely on enter behavior since they seem to care more about the ability to dismiss the dialog from the keyboard than anything else. |
To be fair, it should probably return 0 for a blank ok press, to be consistent with the text input (which will return an empty string and not null in that case), that way you can still use isnull() to tell the difference between what button was used even in the case of an empty submission.
|
In response to Nadrew
|
|
this
|
In response to Lummox JR
|
|
Moved it to a feature request then. Return 0 for a blank ok press
|
In response to NSBR
|
|
NSBR wrote:
Moved it to a feature request then. Return 0 for a blank ok press Bump for 2020 |
In response to NSBR
|
|
NSBR wrote:
Moved it to a feature request then. Return 0 for a blank ok press Bump because of http://www.byond.com/forum/post/2548220#comment25203856 pretty simillar |
In response to NSBR
|
|
It's not similar.
|
In response to Lummox JR
|
|
How come? You've said this on the latest dev news about the other one:
you can't use the escape key to close an input() box even if it allows null What I want is the same but with enter... isn't that simillar? |