Bootstrap Popover 不移动页面调整大小

Rya*_*yan 5 html javascript jquery twitter-bootstrap

我有以下用于简单文本输入的代码,我想要一个弹出框来提供一些附加信息,但是当我调整页面大小时,弹出框是静态的。HTML:

<form action = "" id = "userInput" onsubmit = "return validateInput(this);" method = "GET">
    <div class="form-group" id = "input1">
        <label for="textInput">Input area</label>
        <input type="text" name = "userInput" class="mainInput" id="textInput" autofocus required autocomplete = "off">
    </div>
</form>
Run Code Online (Sandbox Code Playgroud)

javascript:

$(document).ready(function () {
    $('.mainInput').popover({'trigger': 'focus', 'placement': 'right', 
     'container': 'body', 'html': true, 'content': 'a simple popover'});
});
Run Code Online (Sandbox Code Playgroud)

axi*_*dos -3

尝试将“展示位置”更改为“自动”

$(document).ready(function () {
    $('.mainInput').popover({'trigger': 'focus', 'placement': 'auto', 
     'container': 'body', 'html': true, 'content': 'a simple popover'});
});
Run Code Online (Sandbox Code Playgroud)