Comments inline. On Mon, Jun 6, 2011 at 9:58 AM, Gabriel Petrovay <[email protected]>wrote:
> Styling: > How to provide class styling to the input fields? This is because the > autocomplete code gives the input fields new class name: > "pac-input-default". So, if the input had an initial class this is thrown > away. What are some best practices to style such autocomplete-input-fields? > Sounds like a bug! Sorry about that. I've filed this internally. For now, I suggest re-using our class to style your autocomplete fields. If you need more granular control, you could use the HTML id attribute, or wrap the <input> in a <div>. > Hidden text input fields: > If a text input fields is hidden: (the input is in a div that has the > "display: none" style), the autocomplete code does not work anymore. If you > look into the debug console you see that all the classes and elements are > added but the completion proposals don't show up anymore. > This sounds about right to me. Are you trying to show the suggestions without the textbox? > Focus issues: > And one more question. How can one get rid of the default text/change the > default text: "Enter a location". This raises a problem is the focus is > moved in the input field from code with jQuery. The default text is not > deleted. > This is another thing I've filed with the team, we should probably be using the "placeholder" attribute here. Some more issues with the autocomplete feature: > - since the proposal div is absolutely positioned, the resizing of the > window keeps the div in place while the input field changes its position. (I > know this is not a very common behavior of the user: resizing the browser > during completion proposals) > - the problem with the hidden text input fields is that the proposal div > is rendered with a width of 0px and therefore not seen by the user. > Moreover, because of the hidden input field also the position is messed-up, > (top: 0px; left: 0px;), this being probably what it gets from the not > visible input field. This is probably because a hidden input has no width. Again, why are you hiding the input? This is not an intended use case. > And, is it safe to handle classes generated but such an API? > For example I want to remove the pac-input-default class myself. Can I > repy on such a name or is this error-prone since the names can change > anytime? Probably not. The names can change any time. Although I suggested re-using it earlier in this mail, this should probably be a temporary measure until the bug is fixed. Chris -- http://twitter.com/broady -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
