The bug
Typing in some text fields can toggle the narrator. This is especially problematic for keyboard layouts where Ctrl
+ B
(shortcut for toggling the narrator) is used to write a different character, for example Czech, Slovak, Hungarian, Croatian, Slovenian, Serbian and a few other Slavic language keyboards where the way to type "{" is Ctrl
+ Alt
+ B
, or Alt Gr
+ B
.
Affected text fields
This affects all but the "last" text field in all GUIs that have more than 1 text field:
Command block: command field
Same for command block minecarts
Structure block:
All fields other than "Seed" in load mode
All fields other than the 3rd size in save mode
The Server Address field when editing/adding a server
All fields other than "Main Noise Scale X" on Extra Advanced Settings in customize world settings
These are also affected, but are caused by not using GuiTextField (and thus would need a different, albeit still simple) fix:
sign
writable book: title and pages
How to reproduce
Open one of the GUIs listed above
Click on one of the text fields matching the description above (this is required even if the text field is already focused)
Press
Ctrl
+B
Cause
This is caused by the fix to MC-117004 being implemented in a per-GUI manner. Rather than the GUI polling each text field to see if it's focused, when a text field changes focus, it updates the boolean as to whether there are any in the GUI that are focused to match its value. This, combined with the fact that text fields set their focus to false whenever there's a click outside of them (even if they aren't currently focused) means that the value effectively only matches whether the last text field is focused (with a special case when the GUI is first loaded).
The ideal fix would be to go through all text fields and see if they are focused (which isn't performant, but since this check is only performed for narrator, wouldn't be too significant). However, as-is that isn't easy since there is no list of text fields on a GUI (they're handled manually).
For signs and written books, the check method could be directly overridden to always return true.
Linked issues
is duplicated by 1
Comments 3
@Marcono1234
Can confirm that resizing isn't the problem here. It's only when you double click in the text field of the command block that toggles the Narrator.
@@unknown I made the report a little bit more generic. Additionally I was not able to reproduce this by resizing. Can you make sure you did not click a second time in the text field?