diff --git a/druid/base/back_handler.lua b/druid/base/back_handler.lua index 00414c8..b00779a 100644 --- a/druid/base/back_handler.lua +++ b/druid/base/back_handler.lua @@ -32,7 +32,11 @@ end -- @tparam string action_id on_input action id -- @tparam table action on_input action function M.on_input(self, action_id, action) - if action_id == const.ACTION_BACK and action[const.RELEASED] then + if not action[const.RELEASED] then + return false + end + + if action_id == const.ACTION_BACK or action_id == const.ACTION_BACKSPACE then self.on_back:trigger(self:get_context(), self.params) return true end @@ -41,4 +45,4 @@ function M.on_input(self, action_id, action) end -return M \ No newline at end of file +return M