ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: scripple on April 06, 2014, 02:51:26 pm

Title: Post w/o subject locks out post body editing
Post by: scripple on April 06, 2014, 02:51:26 pm
Here's a good one.  Make a new post, edit an old one, whatever.  Delete the subject and click post.  You get a warning on the subject field that says please fill out this line.  But after that you can't edit the body even if you fill out the subject.  You have to reload the page somehow (click post, reload button, etc.) to get the body back to allowing editing.
Title: Re: Post w/o subject locks out post body editing
Post by: emanuele on April 06, 2014, 03:07:15 pm
Code: [Select]
function submitThisOnce(oControl)
{
// oControl might also be a form.
var oForm = 'form' in oControl ? oControl.form : oControl,
aTextareas = oForm.getElementsByTagName('textarea');

for (var i = 0, n = aTextareas.length; i < n; i++)
aTextareas[i].readOnly = true;

return !elk_formSubmitted;
}

hmm... I always wondered if this code was really necessary or not...

Funnily enough, if you have the wiz editor enabled, you can still write.

/me feels submitThisOnce can be deprecated and converted to a dummy function...
Title: Re: Post w/o subject locks out post body editing
Post by: scripple on April 06, 2014, 03:10:21 pm
Well at the very least it needs fixing.  And unrelated this reminds me on your list of oldurl exclusions you should also exclude not just xml but also js .  So things like jsmodify don't become oldurls.
Title: Re: Post w/o subject locks out post body editing
Post by: emanuele on April 06, 2014, 04:47:18 pm
jsmodify is xml, so it's already excluded. ;)
Title: Re: Post w/o subject locks out post body editing
Post by: scripple on April 06, 2014, 04:52:57 pm
Hmm.  I ran into something js that slipped through.  Too long to remember.  Probably me being stupid.
Title: Re: Post w/o subject locks out post body editing
Post by: emanuele on April 10, 2014, 06:39:45 pm
https://github.com/emanuele45/Dialogo/commit/00ee07a356e3fb76fa575304d6ee90895cd5d984

I don't like that "fix" at all, but pending investigations if the function is actually useful or not, it should work... mostly. :-\