fix(web): improve determination of default path
Browser extensions can dynamically insert scripts into a web page, so it's possible that the last script is not what we expected, which can cause the path to the script to be wrong. This change fixes the determination of the default path by using the `document.currentScript` property. It also replaces the use of the deprecated `substr` function in those places.
Fixes: #15158
Browser extensions can dynamically insert scripts into a web page, so
it's possible that the last script is not what we expected, which
can cause the path to the script to be wrong. This change fixes the
determination of the default path by using the `document.currentScript`
property. It also replaces the use of the deprecated `substr` function
in those places.
Fixes: #15158
Test-bot: skip
Use `builder_launch` to launch other builder scripts rather than calling
directly, so that inheritable state and options are passed through.
Test-bot: skip
- initialize `Deadkey.matched` in c'tor
- fix `Deadkey.equal` method
- verify deadkey exists before removing it in `DeadkeyTracker.remove`
- add unit tests for DeadkeyTracker
Test-bot: skip
Make the float UI KeymanWeb link point to the home for KeymanWeb, and
https rather than http, and update the helpURL documentation to match
the current endpoint.
Test-bot: skip
Build-bot: skip
PR #13860 fixed a similar error by adding a check for NaN. However, it missed doing it for `layoutWidth` and only changed `layoutHeight`.
This PR adds a similar check to `layoutWidth` and will thus fix the error we're still seeing in Sentry.
Also add unit tests for both methods.
Fixes: #14108
Fixes: [KEYMAN-WEB-RA](https://keyman.sentry.io/issues/6579536471/?referrer=github_integration)
PR #13860 fixed a similar error by adding a check for NaN. However, it
missed doing it for `layoutWidth` and only changed `layoutHeight`. This
PR adds a similar check to `layoutWidth` and will thus fix the error
we're still seeing in Sentry.
Also add unit tests for both methods.
User Testing
============
TEST_INUKTITUT_KEYBOARD: Using Keyman for Android, install the
`inuktitut_pirurvik` and verify that no error notifications appear.
Fixes: #14108
Fixes: [KEYMAN-WEB-RA](https://keyman.sentry.io/issues/6579536471/?referrer=github_integration)