2017-02-27 108 views
0

在app.js我有,离子:隐藏键盘笑脸图标

if (window.cordova && window.cordova.plugins.Keyboard) { 
     cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); 
     cordova.plugins.Keyboard.disableScroll(true); 
    } 

而在我的HTML我有,

<ion-footer-bar keyboard-attach class="bar-stable item-input-inset" style="margin-bottom: 50px; height: 60px; background-color: white;"> 
    <input style="width: 100%;" type="text" placeholder="{{'text_input' | translate}}" ng-model="post.new"/> 
</ion-footer-bar> 

我想隐藏大于5.0时,在Android的笑脸按钮键盘处于活动状态,我该怎么办?我不希望用户在文本字段中输入笑脸。

回答

0

一个简单的黑客就是改变输入字段的输入类型到其他东西。 根据我的需要,我改变了输入类型为url,它工作。

<ion-footer-bar keyboard-attach class="bar-stable item-input-inset" style="margin-bottom: 50px; height: 60px; background-color: white;"> 
    <input style="width: 100%;" type="url" placeholder="{{'text_input' | translate}}" ng-model="post.new"/> 
</ion-footer-bar> 

希望这有助于..

+0

类型= “URL” 没有奏效。请任何其他建议。 –