Fixes#11364.
Instead of using `className` which may be of type `SVGAnimatedString` if
the element is an SVG element, use `getAttribute('class')`. As that
function can return `null` if the class attribute is not defined, use
optional chaining to avoid a new error...
Uses the same pattern in hardwareEventKeyboard.ts, although I suspect
the problem may never arise there.
I audited the uses of className in our KeymanWeb source and found only
these three instances which may be problematic. I have not searched
elsewhere.
- previously there was an extra `--browsers` flag - `$BROWSERS` already
contains the flag.
- previously we specified `$KARMA_FLAGS` twice if we set
`$KARMA_EXT_FLAGS`
- some cleanup
Note: there is a bit of potential confusion about the difference between
/resources/builder.inc.sh (the full implementation for builder scripts),
and /resources/build/builder.inc.sh (the source script that builder
scripts should always use).
This allows us to make assumptions that will always be true for builder
scripts that may not be true for other scripts, such as setting base
folder.
Fixes#11324.
* Always `cd "$THIS_SCRIPT_PATH"`
* Remove unnecessary `cd` from all build.sh
* Remove unnecessary `set -eu` from all build.sh (and `# set -x`)
* Replace old build-utils.sh incantation in a few build.sh scripts
Add two longpress menus to the `diacritic_rota` keyboard:
- longpress on <kbd>1</kbd>: one subkey that is too wide to fit in the
osk. Keyman is expected to resize the key so that it does fit.
- longpress on <kbd>2</kbd>: Subkeys for A-Z. Subkeys B and Y are
double wide. The keys are expected to be displayed in multiple rows
so that each row fits within the width. Note that there are too many
keys so that the rows don't fit vertically.
Already existing is the longpress on <kbd>.</kbd>. Since the base
keys are wider they won't fit in one row. Keyman is expected to display
them in two rows.
The previous code didn't check that the keys we put in a subkey menu
actually fit within the width of the osk. Additionally the subkey menu
was limited to two rows. This change checks the total width of the keys
in a row. If it gets too wide we continue in the next row.
Fixes#10126.