Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paper input is not a HTMLElement #4

Open
jobizzness opened this issue Feb 3, 2018 · 0 comments
Open

Paper input is not a HTMLElement #4

jobizzness opened this issue Feb 3, 2018 · 0 comments

Comments

@jobizzness
Copy link

For some reason this component is not working and shows in the console that it needs a html element.

_onApiLoad: function() {
var rawInput;

        if (this.$.inputPaper.querySelector('input')) {
            rawInput = this.$.inputPaper.querySelector('input');
        } else {
            rawInput = this.$.inputPaper.root.querySelector('input');
        }

        this.autocomplete = new google.maps.places.Autocomplete(rawInput, this.options);
        google.maps.event.addListener(this.autocomplete, 'place_changed', this._onChangePlace.bind(this));
    },

Changing the query selector to select the input element works.

PS: Sorry my explanation is terrible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant