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

Request #2373 autocomplete Element creates unwanted newline at the end of its output
Submitted: 2004-09-22 15:35 UTC
From: marian at kisd dot de Assigned:
Status: Closed Package: HTML_QuickForm
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2004-09-22 15:35 UTC] marian at kisd dot de
Description: ------------ I am getting an obsolete newline character at the end of the autocomplete element (version is $Id: autocomplete.php,v 1.4 2004/06/15 10:51:42 mansion Exp $) which is rendered as a space by Firefox and others. This prevents autocomplete elements from being positioned at the same horizontal position as other elements. The simple solution is to no ouput the \n char behind </script>. Thanks! Reproduce code: --------------- --- autocomplete.php~ 2004-09-22 17:23:34.000000000 +0200 +++ autocomplete.php 2004-09-22 17:23:34.000000000 +0200 @@ -230,7 +230,7 @@ for ($i = 0; $i < count($this->_options); $i++) { $js .= $arrayName . '[' . $i . "] = '" . strtr($this->_options[$i], $jsEscape) . "';\n"; } - $js .= "//]]>\n</script>\n"; + $js .= "//]]>\n</script>"; } return $js . parent::toHtml(); }// end func toHtml

Comments

 [2004-10-09 19:35 UTC] avb
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.