javascript - virtual keyboard with autocomplete in form -
using angularjs.
i want add virtual keyboard form. therefore tried using keyboard. in setup explain use input field or textarea. however, using autocomplete <md-autocomplete>
angular-material, not have input field. tried binding opening event of keyboard tag. opening work, when trying type, following error occurs:
uncaught typeerror: k.createtextrange not function
the same error occurs when putting id in form field.
i tried, putting hidden input field behind autocomplete tag , copying value of input after finishing typing. however, thing here is, kind of lose autocomplete-feature, when copying input after finishing typing (autocomplete should work while typing well).
so right code this, when trying use form tag keyboard id:
<form ng-submit="mmsisearch()" id="keyboard" ng-click="showkeyboard()" layout="row" layout-align="center"> <md-autocomplete required = "" md-autofocus="true" md-input-name="autocompletefield" md-input-minlength="2" md-input-maxlength="20" md-no-cache="nocache" md-search-text="shipsearchvalue" md-items="item in search(shipsearchvalue)" md-item-text="item" flex="80"> <md-item-template> <span md-highlight-text="shipsearchvalue">{{ item }}</span> </md-item-template> <md-not-found> no matches found. </md-not-found> </md-autocomplete> <md-button type="submit" flex="20"> search </md-button> </form>
so question now, know how use virtual keyboard md-autocomplete option. if have tried other libraries, keyboard should not directive, multiple directive error
occurs. open other library, if working. thanks!
Comments
Post a Comment