From 934f12cdedf1d81f9e88a2932a062fac23427d1a Mon Sep 17 00:00:00 2001 From: Francesco Abbate Date: Thu, 27 May 2021 09:02:19 +0200 Subject: [PATCH] Fix bug with titleview close button not working The bug was actually due to a presence of a ghost tab scrolling button in all the views. We need to check if the node has multiple views, if not there are no tabs and therefore no scrolling button areas so we return nothing from the method Node:get_scroll_button_index(). Close #216 --- data/core/rootview.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/data/core/rootview.lua b/data/core/rootview.lua index 7cdc78cb..fff7a6e7 100644 --- a/data/core/rootview.lua +++ b/data/core/rootview.lua @@ -272,6 +272,7 @@ end function Node:get_scroll_button_index(px, py) + if #self.views == 1 then return 0 end for i = 1, 2 do local x, y, w, h = self:get_scroll_button_rect(i) if px >= x and px < x + w and py >= y and py < y + h then