Skip to content

The Unified and Autonomous Development Platform

fix issue #211 - Unable to input to filter multl-selection choice

Robin Shen69f85e9883a0
diff --git a/server-core/src/main/java/io/onedev/server/web/component/select2/res/select2.js b/server-core/src/main/java/io/onedev/server/web/component/select2/res/select2.js
index 4f28439ce4..7decda6853 100644
--- a/server-core/src/main/java/io/onedev/server/web/component/select2/res/select2.js
+++ b/server-core/src/main/java/io/onedev/server/web/component/select2/res/select2.js
@@ -1036,7 +1036,6 @@ the specific language governing permissions and limitations under the Apache Lic
}, evaluate(this.opts.dropdownCss));
this.dropdown.css(css);
- this.dropdown.css("width", this.container.outerWidth(false));
},
// abstract
@@ -1064,10 +1063,7 @@ the specific language governing permissions and limitations under the Apache Lic
* the dropdown is already open, or if the 'open' event listener on the element called preventDefault().
*/
// abstract
- open: function () {
- // Fix the issue that select2 dropdown position is incorrect in Safari in new pull reqeust page
- $(":focus").blur();
-
+ open: function () {
if (!this.shouldOpen()) return false;
window.setTimeout(this.bind(this.opening), 1);
@@ -1146,6 +1142,7 @@ the specific language governing permissions and limitations under the Apache Lic
$(this).bind(resize+" "+scroll+" "+orient, function (e) {
$("#select2-drop-mask").css(_makeMaskCss());
that.positionDropdown();
+ that.positionDropdown();
});
});
@@ -1339,6 +1336,7 @@ the specific language governing permissions and limitations under the Apache Lic
more.remove();
}
self.positionDropdown();
+ self.positionDropdown();
self.resultsPage = page;
self.context = data.context;
})});
@@ -1380,6 +1378,7 @@ the specific language governing permissions and limitations under the Apache Lic
results.scrollTop(0);
search.removeClass("select2-active");
self.positionDropdown();
+ self.positionDropdown();
}
function render(html) {
@@ -1760,6 +1759,9 @@ the specific language governing permissions and limitations under the Apache Lic
}));
selection.bind("mousedown", this.bind(function (e) {
+ // Fix the issue that select2 dropdown position is incorrect in Safari in new pull reqeust page
+ $(":focus").blur();
+
clickingInside = true;
if (this.opened()) {
@@ -2377,6 +2379,7 @@ the specific language governing permissions and limitations under the Apache Lic
this.updateResults(true);
}
this.positionDropdown();
+ this.positionDropdown();
} else {
// if nothing left to select close
this.close();