Whizzywig often will not allow me to enter data into a field.
mrweaver - March 4, 2008 - 21:38
| Project: | Whizzywig |
| Version: | 5.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I have had intermittent trouble with this editor. Sometimes it will not allow me to enter text into a field, so I have to disable the module in order to fill fields.

#1
Hi,
Can you confirm that this problem occurs when you are trying to enter text into a field that is within a fieldset?
It has been reported and confirmed that the editor doesn't work as it should when it's inside a fieldset. If this is the case for you, i'd suggest you have a look if it's possible to get the field out of the fieldset, as currently i don't see a solution to this problem, as my JS knowledge is too limited.
Kind regards,
Sven
#2
Huh. Well, I think the behavior is more erratic than that. I have been unable to enter into a field, disabled the module; and later, when I am trying to figure out what it is doing and I re-enable it, it will type in the same type of field.
I really liked the look and performance of it. I thought it would be easier on the eyes, and stress levels of some of my users.
#3
I get this behavior as well, although it is not erratic, it is consistent. Whizzywig always dies in a fieldset. One possibility is a conflict between whizzywig.js and drupal's misc/collapse.js, since that would be called only where there is a fieldset. I will poke at it awhile.
I am using the stock ArtistsC01 theme, drupal 5.11 and whizzywig 5.x-dev. I get this even when all of the other contrib modules using js are disabled, and on different themes.
#4
More information:
When whizzywig dies in a fieldset, in general the buttons don't do anything, but the "<>" button (for editing plain text) produces this error:
uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.execCommand]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost/hbgyfc/sites/all/modules/whizzywig/whizzywig/whizzywig.js :: makeSo :: line 309" data: no]Also when looking at the page source I notice a difference when whizzywig dies. Here is the div containing the iframe from a working page (node/add/story):
<div onmouseover="c('edit-body')" style="width: 80%;"><div id="CONTROLSedit-body" class="wzCtrl" unselectable="on">
</div>
<div id="showWYSIWYGedit-body" class="wzCtrl" style="display: none;">
</div>
<iframe id="whizzyedit-body" src="javascript:;" style="border: 1px inset buttonshadow; width: 100%; height: 8em;">
<html>
<head> </head>
<body id="edit-body"> </body>
</html>
</iframe>
</div>
Here is the same region from a non-working page (the Simplenews settings page at admin/content/newsletters/settings):
<div onmouseover="c('edit-simplenews-template-header-12')" style="width: 80%;"><div id="CONTROLSedit-simplenews-template-header-12" class="wzCtrl" unselectable="on">
</div>
<div id="showWYSIWYGedit-simplenews-template-header-12" class="wzCtrl" style="display: none;">
</div>
<iframe id="whizzyedit-simplenews-template-header-12" src="javascript:;" style="border: 1px inset buttonshadow; width: 100%; height: 8em;">
<html>
<head/>
<body/>
</html>
</iframe>
</div>
The only significant difference I can see is that there's no id= in the body tag inside the iframe in the non-functional page.
Still looking at the js.
#5
Hmm, well, misc/collapse.js wraps the editor in a div class="fieldset-wrapper" tag. This happens on line 73 of collapse.js. If you change this line from this:
})).after($('<div class="fieldset-wrapper"></div>').append(fieldset.children(':not(legend)')));to this:
})); // .after($('<div class="fieldset-wrapper"></div>').append(fieldset.children(':not(legend)')));Then it works. 'Course we don't want to edit a core drupal file -- how do we fix this from within whizzywig.module?
#6
Thanks for your research twowheeler.
I have been trying various ways to undo the wrapper div that gets added around the Whizzywig code.
However, I couldn't find a decent solution to solve this from within the Whizzywig module itself.
The best I could come up with, is some script to change collapsible fieldsets to fieldsets that are always open.
Of course this isn't really a nice solution, so I'll keep trying to find a way to solve this.
However i'm not sure if this is going to be possible... It seems that the moving of the fieldset HTML code into the wrapper div, breaks the functionality of the editor.
If someone has some ideas I could try out, please let me know.
Kind regards,
Sven
#7
Please try Whizzywig 6.x-1.0-ALPHA1
To avoid any bugs caused by different version on Whyzziwyg js (I assume you use v55b version, while on June 15, 2009 we have v56 version), so I included Whizzywig js in this project directly. Also, I have change some of the original js to meet Drupal code.
Please open new ticket if you have any new issues. Thanks for using this module.