don't return list idx when mouse is on scrollbar

develop
myk002 2022-11-11 10:40:10 -08:00
parent 6c817889c8
commit 5b1ebdf72a
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 1 additions and 0 deletions

@ -1244,6 +1244,7 @@ function List:onRenderBody(dc)
end end
function List:getIdxUnderMouse() function List:getIdxUnderMouse()
if self.scrollbar:getMousePos() then return end
local _,mouse_y = self:getMousePos() local _,mouse_y = self:getMousePos()
if mouse_y and #self.choices > 0 and if mouse_y and #self.choices > 0 and
mouse_y < (#self.choices-self.page_top+1) * self.row_height then mouse_y < (#self.choices-self.page_top+1) * self.row_height then