Odd behaviour submitting forum form

Odd behaviour submitting forum form

by Howard Miller -
Number of replies: 11
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
This is more of a bad feeling than anything...

I've noticed on moodle.og forums that since upgrade to 2.3 submitting forum posts seems very hit and miss. My guess is that it's something to do with the drag and drop files area (side-note: for a little used function it taked up a hell of a lot of screen area!)

I am using Firefox on Ubuntu. When I click the 'Post to forum' button, most of the time it doesn't work. The screen gives a bit of a 'bounce' for want of a better word but it doesn't appear to submit. On the second click it works - always.

Anybody else experienced this?

EDIT:
On further thought - I *think* it's when the drag-and-drop area and the submit button are off the bottom of the screen and I need to scroll down to click the button. Does that drag-and-drop area perhaps take a significant time to render when brought onto the screen?
Average of ratings: Useful (1)
In reply to Howard Miller

Re: Odd behaviour submitting forum form

by Alex Walker -

After the first click, has any validation text appeared further up the form? (e.g. 'This field is required').

I'm not sure it's related, but I've had problems on some Moodle forms before, where Moodle's form validation Javascript thinks a 'rich text' (TinyMCE) field is empty, so displays this error. On the second click, it successfully submits.

It seems as if TinyMCE's code that writes the HTML back to the <textarea> is called after the form validation code, so it thinks the field is blank. The second time you submit the form, it's obviously been written on the first button press, so it accepts it.

It doesn't happen all the time, it's intermittent on different pages. Without delving into the code too much, it seems like sometimes TinyMCE writes back first, sometimes the form validates first.

Average of ratings: Useful (1)
In reply to Alex Walker

Re: Odd behaviour submitting forum form

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I first thought... will anybody tell me I have left a field empty. Then I though, nobody would do that big grin big grin big grin

The whole thing has been rendered a touch clunky by the sheer amount of javascript on the page. Typing this message, I got the first three words typed and then the page jumped to the submit button and the focus changed. It's obviously continuing to load all the JS in the background.

While it's nice to have the extra facilities in 2.3, I'd be a bit concerned if it was at the expense of the loading time. I'm not on the world's fastest connection but I wouldn't call it slow either.

I don't think this is a second click in the sense that the page is being submitted twice. I think something is preventing the submit button being recognised when it's clicked. Possibly that the page hasn't actually fully loaded in the time it takes to write a post!! I don't know.
Average of ratings: Useful (1)
In reply to Howard Miller

Re: Odd behaviour submitting forum form

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Test...

Mine worked ok...I dont know what you are moaning about!

In reply to Mary Evans

Re: Odd behaviour submitting forum form

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I blame the theme big grin big grin
In reply to Alex Walker

Re: Odd behaviour submitting forum form

by jason hull -

Alex,

I am experiencing a similar problem, currently on moodle 2.0 . I too believe it is a problem with tinyMCE and validation. It seems inconsistent and I can't work out how to fix.

Sometimes it works first time, other times the first submit causes the validation text to appear (suggesting tinyMCE has not written back to the form field) on second click it submits correctly. If however you go back into the form to edit... it writes back the previous text, not the edit...

In reply to Howard Miller

Re: Odd behaviour submitting forum form

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Howard "... it's something to do with the drag and drop files area (side-note: for a little used function it takes up a hell of a lot of screen area!)"

I couldn't agree more.sad

Joseph

Average of ratings: Useful (1)
In reply to Joseph Rézeau

Re: Odd behaviour submitting forum form

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
>> (side-note: for a little used function it takes up a hell of a lot of screen area!)

A side-side-note and some trivia:

I've posted close to 2500 messages in moodle.org http://moodle.org/mod/forum/user.php?id=41095. I wonder how many of them have attachments, DnD or not. May be 10? Or 20?

What I know for sure is that I haven't dragged anything into this new widget. I am a heavy key board user. For those compulsory mouse movements I move one fore finger on to the pointing stick of my ThinkPad. The kind of gymnastics this DnD requires would pull all my fingers from their base positions.
sad
In reply to Visvanath Ratnaweera

Re: Odd behaviour submitting forum form

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Visvanath Ratnaweera "The kind of gymnastics this DnD requires would pull all my fingers from their base positions."

Ouch. sad

In reply to Joseph Rézeau

Re: Odd behaviour submitting forum form

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Joseph

Big disappointment. Even with finger gymnastics I don't know how to DnD.
sad

Usually I look at files in the terminal. Just out of curiosity I started the GUI file manager "thunar" and tried to DnD a small pic in to the (big) landing area, the one with the animated arrow. As I released the mouse The browser jumped in to a special state showing only the pic in a kind of full window mode (see pic). Nothing else on the screen. The back button in the browser takes me to square one, I mean, no pic inserted.

What am I doing wrong? Is there a particular place in that big landing area to drop the file?

OS: Linux CrunchBang Stattler (Debian Squeeze)
Window manager: OpenBox
Browser: Iceweasel (Firefox) 11
Attachment thumb2.png
In reply to Visvanath Ratnaweera

Re: Odd behaviour submitting forum form

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

It's entirely possible that Iceweasel doesn't support dragging and dropping from Thunar. From within the browser it isn't possible to tell what file manager software you might drag and drop from, only that the browser declares that it has support for drag and drop.

If it is working, then as soon as you drag onto the page the message in the filemanager should change to 'drop files here to upload' and the dotted border should turn red. When you drag the file over the filemanager element itself the border should turn blue, indicating it is safe to drop it.

I've had this working with Nautilus & Dolphin under Ubuntu & Debian (Firefox, Iceweasel, Chrome, Chromium) as well as with Windows Explorer in Windows XP / 7 (Firefox, Chrome). I understand it also works fine on Mac, but I've no way of testing that.