mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 00:15:32 +00:00
fix(web): Simplify initialization of options
This commit is contained in:
parent
36acc16927
commit
e5e1ccff4e
2 changed files with 4 additions and 7 deletions
|
|
@ -30,7 +30,7 @@ if(!window['keyman']['initialized']) {
|
|||
*/
|
||||
keymanweb.setDefaultDeviceOptions = function(opt : com.keyman.OptionType) {
|
||||
// Element attachment type
|
||||
if (opt['attachType'] == '' || opt['attachType'] === undefined) {
|
||||
if (!opt['attachType']) {
|
||||
opt['attachType'] = (device.touchable ? 'manual' : 'auto');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,12 +41,9 @@
|
|||
var attachText = attachType ? attachType : "default";
|
||||
|
||||
var kmw=window.keyman;
|
||||
if (attachType) {
|
||||
kmw.init({
|
||||
attachType: attachType});
|
||||
} else {
|
||||
kmw.init({});
|
||||
}
|
||||
kmw.init({
|
||||
attachType: attachType ? attachType : ''
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- Add keyboard management script for local selection of keyboards to use -->
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue