diff --git a/plugin/src/main/java/com/arcbees/chosen/client/ChosenImpl.java b/plugin/src/main/java/com/arcbees/chosen/client/ChosenImpl.java
index e850e2a..7c8d93c 100644
--- a/plugin/src/main/java/com/arcbees/chosen/client/ChosenImpl.java
+++ b/plugin/src/main/java/com/arcbees/chosen/client/ChosenImpl.java
@@ -92,7 +92,6 @@ public abstract class ChosenImpl {
protected GQuery searchContainer;
protected String defaultText;
private GQuery $selectElement;
- private boolean allowSingleDeselect;
private GQuery container;
private String containerId;
private ChosenCss css;
@@ -594,9 +593,7 @@ protected void fireChosenChangeEventIfNotEqual(OptionItem item, String newValue,
protected void addChoice(OptionItem item) {
selectedItem.find("span").text(item.getText());
- if (allowSingleDeselect) {
- singleDeselectControlBuild();
- }
+ singleDeselectControlBuild();
selectedValues.clear();
}
@@ -859,6 +856,13 @@ private boolean containerMouseUp(Event e) {
return true;
}
+ private SafeHtml createEmptyOption() {
+ SafeHtmlBuilder builder = new SafeHtmlBuilder();
+ builder.append(fromTrustedString(""));
+
+ return builder.toSafeHtml();
+ }
+
private SafeHtml createOption(OptionItem item) {
SafeHtmlBuilder builder = new SafeHtmlBuilder();
builder.append(fromTrustedString("