Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.3.3

Bug #15300 class "error" not removed on select boxes and textareas
Submitted: 2008-12-13 22:25 UTC
From: gery Assigned: wiesemann
Status: Verified Package: HTML_QuickForm_DHTMLRulesTableless (version 0.3.3)
PHP Version: 5.2.5 OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 36 - 34 = ?

 
 [2008-12-13 22:25 UTC] gery (Gery Flament)
Description: ------------ The style class "error" set on the field's HTML parent element when there is an error, is not removed when the user correct the error and leave the field or submit the form. This bug affects only select boxes and textareas. The problem has to do with the line 196 of the file \HTML\QuickForm\DHTMLRulesTableless.php: if (div.firstChild.innerHTML != "") { which returns true if you have a select or a textarea as these elements have or can have some inner HTML. To correct the bug, I'd suggest the rewrite of this line like this : if (div.firstChild.tagName == \'DIV\') { Test script: --------------- Here a page with a demonstration of the bug: http://gery.flament.free.fr/en/Development/pear/DHTLM-Rules-class-error-not-removed-with-select.php Expected result: ----------------
Actual result: --------------
</li>

Comments

 [2008-12-26 18:58 UTC] wiesemann (Mark Wiesemann)
Thanks for this report and the suggested patch. Unfortunately, your suggestion seems to break the group example in the bundled example file (second row, "ID"). I'll try to find another solution.