keymanapp / keymanapp/keyman

bug(web): `keyman.init({root:path})` does not set `options.resources`, `options.keyboards`, or `options.fonts` as described in documentation

Open
#11,476 1 comment 0 reactions 1 assignee Claimed by @ermshiperete View on GitHub
bug web/
Dominant language
Pascal
Stars
534
Forks
143
Avg merge
2d 10h
Merged PRs (30d)
113

Description

If you call `keyman.init({root: path})`, the [documentation](https://help.keyman.com/developer/engine/web/17.0/reference/core/init) says that `options.resources`, `options.keyboards`, and `options.fonts` properties will be set relative to the passed-in `root`.

However, instead these values are set to an empty string, or for `options.resources`, to the script's `src` path (which is empty string when #11475 is encountered).

KeymanWeb 16.0.147.

As a temporary workaround, I suggested the following to the user encountering this issue:

```js
keyman.init({
attachType: 'auto',
root: 'https://s.keyman.com/kmw/engine/16.0.147/',
resources: 'https://s.keyman.com/kmw/engine/16.0.147/',
keyboards: 'https://s.keyman.com/keyboard/',
fonts: 'https://s.keyman.com/font/'
});
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.