This repository was archived by the owner on Apr 18, 2024. It is now read-only.
This repository was archived by the owner on Apr 18, 2024. It is now read-only.
Escape Hotkey not working to deselect Label when Taxonomy tags are present #873
Open
Description
Based on master
branch as of 26 September 2022, when I configure labelling with both Labels
tag and Taxonomy
tag, Escape
hotkey is not working to deactivate selected labels.
WIthout the Taxonomy
in the labelling config, Escape
hotkey works as expected. (This issue does not appear when I use Label Studio v1.3.0 and earlier)
Sample label config
<View>
<Labels name="ner" toName="text">
<Label value="Person"></Label>
<Label value="Organization"></Label>
<Label value="Fact"></Label>
<Label value="Money"></Label>
<Label value="Date"></Label>
<Label value="Time"></Label>
<Label value="Ordinal"></Label>
<Label value="Percent"></Label>
<Label value="Product"></Label>
<Label value="Language"></Label>
<Label value="Location"></Label>
</Labels>
<Text name="text" value="$text"></Text>
<!-- If Taxonomy is removed, Escape hotkey is working as expected to deactivate labels -->
<Taxonomy name="tax" toName="text">
<Choice value="One" />
<Choice value="Two" />
<Choice value="Three">
<Choice value="Sub" />
<Choice value="With" />
<Choice value="Tuna" />
</Choice>
</Taxonomy>
</View>
I'm not sure what's the best way to solve this Hotkey issue, but I think this event handler in Taxonomy is the one that's causing Escape to not work as expected to deactivate/deselect selected Labels (around line 468 in the code snippet below). I understand pressing Escape is meant to close the dropdown in Taxonomy selection, but it seems to prevent deactivating selected Labels as well.