FIX: autocomplete showing under keyboard on android (#20168)
Fixed had been added when autocomplete was used in the discourse header. This shouldn't be needed anymore. This was causing the preventOverflow to not work correctly on Android. This fix fix also adds an optimisation to refer top of the input when on mobile. This is done to avoid cases where the screen is actually slightly taller than the viewport with keyboard visible on Android leading popper to think there's space under the input.
This commit is contained in:
parent
85e1a4934b
commit
232c9d84b7
|
@ -385,8 +385,7 @@ export default function (options) {
|
|||
if (isInput || options.treatAsTextarea) {
|
||||
_autoCompletePopper && _autoCompletePopper.destroy();
|
||||
_autoCompletePopper = createPopper(me[0], div[0], {
|
||||
placement: "bottom-start",
|
||||
strategy: "fixed",
|
||||
placement: `${Site.currentProp("mobileView") ? "top" : "bottom"}-start`,
|
||||
modifiers: [
|
||||
{
|
||||
name: "offset",
|
||||
|
|
Loading…
Reference in New Issue