diff --git a/frontend/apps/reader/modules/readerbookmark.lua b/frontend/apps/reader/modules/readerbookmark.lua index 759510f09..0c247679f 100644 --- a/frontend/apps/reader/modules/readerbookmark.lua +++ b/frontend/apps/reader/modules/readerbookmark.lua @@ -893,8 +893,8 @@ function ReaderBookmark:renameBookmark(item, from_highlight) description = " " .. T(_("Page: %1"), bookmark.mandatory) .. " " .. T(_("Time: %1"), bookmark.datetime), input = bookmark.text_orig, allow_newline = true, - cursor_at_end = false, add_scroll_buttons = true, + use_available_height = true, buttons = { { { diff --git a/frontend/ui/widget/inputdialog.lua b/frontend/ui/widget/inputdialog.lua index 1f0ea4e13..702a49c51 100644 --- a/frontend/ui/widget/inputdialog.lua +++ b/frontend/ui/widget/inputdialog.lua @@ -133,6 +133,7 @@ local InputDialog = InputContainer:new{ readonly = false, -- don't allow editing, will not show keyboard allow_newline = false, -- allow entering new lines (this disables any enter_callback) cursor_at_end = true, -- starts with cursor at end of text, ready for appending + use_available_height = false, -- adjust input box to fill available height on screen fullscreen = false, -- adjust to full screen minus keyboard condensed = false, -- true will prevent adding air and balance between elements add_scroll_buttons = false, -- add scroll Up/Down buttons to first row of buttons @@ -347,7 +348,7 @@ function InputDialog:init() - vspan_after_input_text:getSize().h - buttons_container:getSize().h - keyboard_height - if self.fullscreen or text_height > available_height then + if self.fullscreen or self.use_available_height or text_height > available_height then -- Don't leave unusable space in the text widget, as the user could think -- it's an empty line: move that space in pads after and below (for centering) self.text_height = math.floor(available_height / line_height) * line_height @@ -356,7 +357,9 @@ function InputDialog:init() local pad_after = pad_height - pad_before vspan_before_input_text.width = vspan_before_input_text.width + pad_before vspan_after_input_text.width = vspan_after_input_text.width + pad_after - self.cursor_at_end = false -- stay at start if overflowed + if text_height > available_height then + self.cursor_at_end = false -- stay at start if overflowed + end else -- Don't leave unusable space in the text widget self.text_height = text_height