The bug
While typing in a text box, if you press Shift
once, it will start selecting text from that point until you press any other key (that is not Shift).
The expected behavior is that Shift
should only select text if it's held down.
Example
Here is an example in video:
[media]Code analysis
Based on decompiled sources of 22w42a, this can be fixed by overriding keyReleased()
in EditBox.java
like so:
@Override
public boolean keyReleased(int n, int n2, int n3) {
this.shiftPressed = Screen.hasShiftDown();
// possibly return super.keyReleased();
}
– @unknown in this comment
Related issues
is duplicated by
relates to
Attachments
Comments


Still in 1.14.1 Release

Still in 1.14.2 Pre-Release 1 and 1.14.2 Pre-Release 2

Confirmed in 1.15pre-6

It seems this confirmed bug doesn't have a priority assigned yet

Can confirm in 1.15.2

Confirmed in 20w51a

Based on decompiled sources of 22w42a, this can be fixed by overriding keyReleased()
in EditBox.java
like so:
@Override
public boolean keyReleased(int n, int n2, int n3) {
this.shiftPressed = Screen.hasShiftDown();
// possibly return super.keyReleased();
}