mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-11 03:15:33 +00:00
Merge pull request #11109 from keymanapp/fix/developer/11107-scroll-typeerror
fix(developer): prevent error when scrolling touch layout editor with no selected key
This commit is contained in:
commit
ebe258d062
1 changed files with 3 additions and 3 deletions
|
|
@ -18,8 +18,8 @@ $(function() {
|
|||
this.saveSelection = function() {
|
||||
let key = builder.selectedKey(), subKey = builder.selectedSubKey();
|
||||
return {
|
||||
id: key ? $(key).data('id') : null,
|
||||
subId: subKey ? $(subKey).data('id') : null
|
||||
id: key.length ? $(key).data('id') : null,
|
||||
subId: subKey.length ? $(subKey).data('id') : null
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -971,7 +971,7 @@ $(function() {
|
|||
|
||||
$('#kbd-scroll-container').on('scroll', function () {
|
||||
const key = builder.selectedKey();
|
||||
if(key) {
|
||||
if(key.length) {
|
||||
builder.moveWedgesAround(key[0]);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue