Trying to fix custom touch control sometimes not showing

This commit is contained in:
redphx
2024-05-12 15:07:18 +07:00
parent 4068930db7
commit e867f156e8
3 changed files with 17 additions and 1 deletions

View File

@@ -286,7 +286,13 @@ if (window.BX_VIBRATION_INTENSITY && window.BX_VIBRATION_INTENSITY < 1) {
return false;
}
str = str.replace(text, 'window.BX_EXPOSED["touchLayoutManager"] = this,' + text);
const newCode = `
true;
window.BX_EXPOSED["touchLayoutManager"] = this;
window.dispatchEvent(new Event("${BxEvent.TOUCH_LAYOUT_MANAGER_READY}"));
`;
str = str.replace(text, newCode + text);
return str;
},