mirror of
https://github.com/mjl-/mox.git
synced 2025-07-14 07:34:36 +03:00
webmail: fix js error rerendering additional headers after updated keywords
i've seen the error a few times: msgheaderElem.children[(msgheaderElem.children.length - 1)] is undefined i've seen it happen after sending a reply (with the "answered" flag added). the updateKeywords callback would render the message again, but the code for rendering the "additional headers" table rows again was making invalid assumptions. the approach is now changed. the backend now just immediately sends the additional headers to the frontend. before, the frontend would first render the base message, then render again once the headers came in for the parsed message. this also prevents a reflow for the (quite common) case that one of the additional headers are present in the message.
This commit is contained in:
@ -22,7 +22,7 @@ const init = () => {
|
||||
)
|
||||
}
|
||||
|
||||
const msgheaderview = dom.table(styleClasses.msgHeaders)
|
||||
const msgheaderview = dom.tbody()
|
||||
loadMsgheaderView(msgheaderview, mi, [], null, true)
|
||||
|
||||
const l = window.location.pathname.split('/')
|
||||
@ -45,7 +45,10 @@ const init = () => {
|
||||
const root = dom.div(
|
||||
dom.div(
|
||||
css('msgMeta', {backgroundColor: styles.backgroundColorMild, borderBottom: '1px solid', borderBottomColor: styles.borderColor}),
|
||||
msgheaderview,
|
||||
dom.table(
|
||||
styleClasses.msgHeaders,
|
||||
msgheaderview,
|
||||
),
|
||||
msgattachmentview,
|
||||
),
|
||||
iframe=dom.iframe(
|
||||
|
Reference in New Issue
Block a user