When using the form to edit a chest label, apply the edited label whenever the
form is submitted with the text field included, rather than only if the form's
specific "finished editing" button is used. This supports the natural use of
<ret> to indicate that text editing is complete, which works with other text
editing forms such as that for signs.
if fields.edit_infotext then
page = "edit_infotext"
end
- if fields.save_infotext then
+ if fields.infotext_box then
meta:set_string("infotext", fields.infotext_box)
end
local formspec = data.formspec