key remapping: set press enter to chat text regardless of chatbox focus

I can't figure out why this was originally added, but this shouldn't
care about the chatbox focus state since the script event is in the
script which builds the chatbox input widget. This is currently causing
an issue where the input rebuild script runs immediately before the
chatbox input keylistener is reapplied when closing input dialogs.
This commit is contained in:
Adam
2021-02-13 22:32:06 -05:00
parent 1684eccd00
commit 8a728c1053

View File

@@ -162,12 +162,9 @@ public class KeyRemappingPlugin extends Plugin
{
case SCRIPT_EVENT_SET_CHATBOX_INPUT:
Widget chatboxInput = client.getWidget(WidgetInfo.CHATBOX_INPUT);
if (chatboxInput != null)
if (chatboxInput != null && !typing)
{
if (chatboxFocused() && !typing)
{
setChatboxWidgetInput(chatboxInput, PRESS_ENTER_TO_CHAT);
}
setChatboxWidgetInput(chatboxInput, PRESS_ENTER_TO_CHAT);
}
break;
case SCRIPT_EVENT_BLOCK_CHAT_INPUT: