webmail: after clicking on the "create mailbox" button, automatically put focus on the input field for the new mailbox name

This commit is contained in:
Mechiel Lukkien 2025-01-30 11:02:12 +01:00
parent f9280b0891
commit c8fd9ca664
No known key found for this signature in database
2 changed files with 4 additions and 0 deletions

View File

@ -5516,6 +5516,7 @@ const newMailboxView = (xmb, mailboxlistView, otherMailbox) => {
await withStatus('Renaming mailbox', client.MailboxRename(mbv.mailbox.ID, name.value), fieldset); await withStatus('Renaming mailbox', client.MailboxRename(mbv.mailbox.ID, name.value), fieldset);
remove2(); remove2();
}, fieldset = dom.fieldset(dom.label('Name ', name = dom.input(attr.required(''), attr.value(mbv.mailbox.Name), prop({ selectionStart: 0, selectionEnd: mbv.mailbox.Name.length }))), ' ', dom.submitbutton('Rename')))); }, fieldset = dom.fieldset(dom.label('Name ', name = dom.input(attr.required(''), attr.value(mbv.mailbox.Name), prop({ selectionStart: 0, selectionEnd: mbv.mailbox.Name.length }))), ' ', dom.submitbutton('Rename'))));
name.focus();
})), dom.div(dom.clickbutton('Set role for mailbox...', attr.title('Set a special-use role on the mailbox, making it the designated mailbox for either Archived, Sent, Draft, Trashed or Junk messages.'), async function click() { })), dom.div(dom.clickbutton('Set role for mailbox...', attr.title('Set a special-use role on the mailbox, making it the designated mailbox for either Archived, Sent, Draft, Trashed or Junk messages.'), async function click() {
remove(); remove();
const setUse = async (set) => { const setUse = async (set) => {
@ -5771,6 +5772,7 @@ const newMailboxlistView = (msglistView, requestNewView, updatePageTitle, setLoc
removeCreate(); removeCreate();
}, fieldset = dom.fieldset(dom.label('Name ', name = dom.input(attr.required('yes'), focusPlaceholder('Lists/Go/Nuts'))), ' ', dom.submitbutton('Create')))); }, fieldset = dom.fieldset(dom.label('Name ', name = dom.input(attr.required('yes'), focusPlaceholder('Lists/Go/Nuts'))), ' ', dom.submitbutton('Create'))));
remove(); remove();
name.focus();
})), dom.div(dom.clickbutton('Export', function click(e) { })), dom.div(dom.clickbutton('Export', function click(e) {
const ref = e.target; const ref = e.target;
popoverExport(ref, ''); popoverExport(ref, '');

View File

@ -5203,6 +5203,7 @@ const newMailboxView = (xmb: api.Mailbox, mailboxlistView: MailboxlistView, othe
), ),
), ),
) )
name.focus()
}), }),
), ),
dom.div( dom.div(
@ -5562,6 +5563,7 @@ const newMailboxlistView = (msglistView: MsglistView, requestNewView: requestNew
), ),
) )
remove() remove()
name.focus()
}), }),
), ),
dom.div( dom.div(