Skip to content
This repository was archived by the owner on Jan 3, 2020. It is now read-only.

Commit 8f01ba4

Browse files
committed
fix
1 parent ee314b0 commit 8f01ba4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/java/org/devinprogress/YAIF/Bridges/CommonBridgeNoField.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.devinprogress.YAIF.Bridges;
22

33
import net.minecraft.client.gui.GuiScreen;
4+
import org.devinprogress.YAIF.GuiStateManager;
45
import org.devinprogress.YAIF.InputFieldWrapper;
56
import org.devinprogress.YAIF.YetAnotherInputFix;
67

@@ -77,8 +78,9 @@ public void run() {
7778
bindKey(tf, KeyEvent.VK_ESCAPE, "esc", new AbstractAction() {
7879
@Override
7980
public void actionPerformed(ActionEvent e) {
80-
YetAnotherInputFix.log("CommonBridgeNoField ESC Pressed");
81-
wrapper.bridgeQuit();
81+
GuiStateManager.getInstance().TextFieldFocusChanged(gui,null,false);
82+
wrapper.closeInputField();
83+
//wrapper.bridgeQuit();
8284
}
8385
});
8486

@@ -100,6 +102,7 @@ public void run() {
100102
return;
101103
}
102104
int pos=wrapper.getCaretPosition();
105+
if(pos==0)return;
103106
t=t.substring(0,pos-1)+t.substring(pos);
104107
wrapper.setText(t,pos-1);
105108
}

0 commit comments

Comments
 (0)