fix(developer): error when rescaling touch layout editor keys

Fixes #10194.
This commit is contained in:
Marc Durdin 2023-12-11 12:39:33 +07:00
parent 61a0155435
commit 39a53d439a

View file

@ -874,7 +874,7 @@ $(function() {
const k = builder.selectedKey();
const keyId = k.data('id');
const keyItems = $('#kbd .key').filter((_index,item) => $(item).data('id') === keyId);
const keyItemIndex = keyItems.indexOf(k.length ? k[0] : null);
const keyItemIndex = keyItems.toArray().indexOf(k.length ? k[0] : null);
builder.prepareLayer();
if (keyId !== null && keyItemIndex >= 0) {
const newKeyItems = $('#kbd .key').filter((_index,item) => $(item).data('id') === keyId);