• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Draft not show in add-post action.

Chris D

XenForo developer
Staff member
#8
There's actually no draft handling on this page - we save them but we don't retrieve them; even if we did there's a chance it would get overridden by this:
PHP:
else if ($this->_input->inRequest('more_options'))
{
    $defaultMessage = $this->getHelper('Editor')->getMessageText('message', $this->_input);
}
'more_options' will always appear in the request as refreshing the page which was retrieved via a POST request will resubmit the same data.
 

Mike

XenForo developer
Staff member
#9
I've added draft handling here. Note that it's basically only relevant if you go to threads/<id>/reply directly. If you are doing a "more options" click or are quoting a message, these will override the draft display.
 

Jake B.

Well-known member
#10
I've added draft handling here. Note that it's basically only relevant if you go to threads/<id>/reply directly. If you are doing a "more options" click or are quoting a message, these will override the draft display.
I think the biggest issue is if you refresh :)
 

Mike

XenForo developer
Staff member
#11
In what scenario? If you're refreshing in a case where you've hit more options or quoted a message, there's actually an explicit action there of what you want to do, and it doesn't necessarily match with what draft is saved. You'll see some cases like this in the conversation system.