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  
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 : 20 + 46 = ?

 
 [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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!