fix: make ToolHub UI actions responsive

This commit is contained in:
7015725
2026-05-22 04:27:45 +08:00
parent 78218ce1f5
commit 32fe099fab
6 changed files with 49 additions and 30 deletions

View File

@@ -1577,12 +1577,13 @@ FloatBallAppWM.prototype.showIconPicker = function(opts) {
if (e.getAction() === android.view.MotionEvent.ACTION_DOWN) {
try {
var rect = new android.graphics.Rect();
if (state.root) {
state.root.getGlobalVisibleRect(rect);
if (panel) {
panel.getGlobalVisibleRect(rect);
var x = e.getRawX();
var y = e.getRawY();
if (!rect.contains(x, y)) {
hide();
return true;
}
}
} catch(eOut) { safeLog(null, 'e', "catch " + String(eOut)); }