我有以下HTML代码
<div class="input-group">
<input class="form-control" type="number"
[(ngModel)]="cons.failPercent" [ngModelOptions]="{
standalone: true}"
mdTooltip="Typically valves can be repaired three times
before they need to be replaced"
mdTooltipPosition="right"
autofocus/>
</div>
我正在使用Angular 4并且工具提示阻止在Safari中输入框输入,但在Chrome中它可以正常工作。有没有办法让工具提示仍然可以在Safari中使用?
答案 0 :(得分:2)
我确实曾经遇到过这个问题...您必须从 class ViewController: UIViewController {
var user1 : User?
var user2 : User?
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
user1 = User()
user1?.friend = user1
user1 = nil
}
中删除 mdTooltip
,并将其用作 input
标记,然后就可以了:
div
我也会使用 <div class="input-group" mdTooltip="Typically valves can be repaired three times before they need to be replaced">
<input class="form-control" type="number"[
[(ngModel)]="cons.failPercent" [ngModelOptions]="{
standalone: true}"
mdTooltipPosition="right"
autofocus/>
</div>
代替: matTooltip
。
Here你可以找到我的旧问题