mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 12:51:24 +08:00
FEATURE: Autocomplete support on advanced search
This commit is contained in:
@ -82,7 +82,7 @@ export default function(options) {
|
||||
let prevTerm = null;
|
||||
|
||||
// input is handled differently
|
||||
const isInput = this[0].tagName === "INPUT";
|
||||
const isInput = this[0].tagName === "INPUT" && !options.treatAsTextarea;
|
||||
let inputSelectedItems = [];
|
||||
|
||||
function closeAutocomplete() {
|
||||
@ -175,8 +175,10 @@ export default function(options) {
|
||||
wrap.width(width);
|
||||
}
|
||||
|
||||
if(options.single) {
|
||||
this.css("width","100%");
|
||||
if(options.single && !options.width) {
|
||||
this.css("width", "100%");
|
||||
} else if (options.width) {
|
||||
this.css("width", options.width);
|
||||
} else {
|
||||
this.width(150);
|
||||
}
|
||||
@ -258,7 +260,7 @@ export default function(options) {
|
||||
|
||||
me.parent().append(div);
|
||||
|
||||
if (!isInput) {
|
||||
if (!isInput && !options.treatAsTextarea) {
|
||||
vOffset = div.height();
|
||||
|
||||
if ((window.innerHeight - me.outerHeight() - $("header.d-header").innerHeight()) < vOffset) {
|
||||
|
Reference in New Issue
Block a user