Forums » Suggestions

Make console & lua error messages on mobile not go behind controls while flying

Aug 25, 2023 tjgaming8324 link
This is ridiculously annoying thing.... A lua error pops in randomly & if I tap outside of it, I'm screwed but tapping outside of the error message box is 95% of the time unavoidable.

Same with console.... If I wanna open console while flying, I can't or I stand at a risk of it going behind the controls & getting me screwed up again. The console thing is very annoying when making plugins on mobile.

Many say you can press the back button on your phone & that fixes it... No it doesn't atleast for me.

Please fix this as soon as possible
Aug 26, 2023 draugath link
The main issue isn't that a dialog can be placed behind another when that other dialog is given the focus. The main issue appears to be that dialogs without a `defaultesc` property cannot be closed by swiping back on a mobile device, when their z-order changes, and can cause the client to get stuck in an unrecoverable state.

I have tested dropping a dialog under the HUD both with and without `defaultesc` and those with can be closed.

If the error message dialogs had their `defaultesc` property set to the OK button, it should be possible to recover from. This should not be necessary with the console, since it can already be closed by swiping back, even with it behind the HUD dialog.

I have experienced some errors where you can swipe Back to open Options and then close the error, but I have not yet been able to reproduce these errors to provide a test case.

tjgaming may have experienced a stuck state with the console, but I have not experienced this and can't provide any feedback regarding it.

On a related note, if an error occurs during plugin load, it is not possible to recover the client without closing it, since the console cannot be opened on mobile in this state. From tjgaming's point of "making plugins on mobile", this might need similar consideration.
Aug 26, 2023 draugath link
I just thought of something when considering possible remedies. If the error dialog is made modal and if the console dialog is prevented from being raised, this could lead to a near unrecoverable state, on PC even, if a large number of errors are raised at once. This can happen when a `motion_cb()` on some control has an error (possibly other causes too). It is still possible to eventually close them all, but there is potential for there to be a lot of them. (I've had the good fortune to have over 50 before, because I moved the mouse too fast, not anticipating an error).

Based on my testing, I think the best approach would be to utilize the aforementioned `defaultesc` property, since it should have the least (no?) impact on general operation.
Oct 02, 2023 incarnate link
Improved in 1.8.657:

- Lua Error dialogs and the console no longer allow the HUD to be placed in front of them.