Issue Details (XML | Word | Printable)

Key: MDL-15019
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Jamie Pratt
Reporter: Steve Bond
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Javascript bug when adding label using IE6.0

Created: 27/May/08 08:39 PM   Updated: 23/Sep/09 06:05 AM
Return to search
Component/s: Forms Library, Resource
Affects Version/s: 1.8, 1.9
Fix Version/s: None

File Attachments: 1. Text File htmleditor.patch (1 kB)

Environment: Internet Explorer 6.0, Windows
Issue Links:
Relates
 

Participants: Dan Marsden, Jamie Pratt, Robin Britt and Steve Bond
Security Level: None
Affected Branches: MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
When adding a label to a course in IE6, I get a Javascript error:

"Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus."

It doesn't seem to occur in Firefox 2 or IE7.

The problem seems to be that, for labels, the first field on the page is the textarea of the HTML editor, and for some reason this won't accept the focus. I am not sure why, so I've not been able to fix it.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Dan Marsden added a comment - 23/Jul/08 09:22 AM
attaching Piers patch for this issue - see MDL-9077 for more context.

Piers Harding - 23/Jul/08 08:42 AM
After correcting the reference field JS validation problem, I stumbled upon another to do with validation (client, and server) of textarea fields that have an html editor attached. When the validation fails it attempts to set the focus() on the textarea which has been masked by the iframe of the html editor.
The attached patch checks to see if an element is a textarea, and whether the user has htmleditor enabled - if so it bypasses the focus() call.

This issue affects all forms that use the htmleditor.

Cheers,
Piers Harding.


Robin Britt added a comment - 23/Sep/09 06:05 AM
I'm brand new to Moodle and to this forum, so forgive me if I'm in the wrong place. This appears to be the error that started happening for me today (despite having added labels on previous days). It occurs in IE 8.0.6.001 and in Firefox 3.0.14. We are running Moodle 1.9.

Thanks!
Robin