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

Suddenly stop working #70

Open
anatamburus opened this issue Jan 2, 2018 · 4 comments
Open

Suddenly stop working #70

anatamburus opened this issue Jan 2, 2018 · 4 comments

Comments

@anatamburus
Copy link

The getmdl-select structure was working normally and suddenly stopped working.

When I click on the input to open the select it appears this error:
Uncaught TypeError: Cannot set property 'value' of null
at r (src\js\getmdl-select.js:59)
at HTMLInputElement.t.onclick (src\js\getmdl-select.js:98)
r @ src\js\getmdl-select.js:59
t.onclick @ src\js\getmdl-select.js:98

The list of data appears normal and when I click to choose the option appears these two errors:
Uncaught TypeError: Cannot set property 'value' of null
at d (src\js\getmdl-select.js:41)
at HTMLLIElement.n.onclick (src\js\getmdl-select.js:175)
d @ src\js\getmdl-select.js:41
n.onclick @ src\js\getmdl-select.js:175

Uncaught TypeError: Cannot set property 'value' of null
at HTMLBodyElement.r (src\js\getmdl-select.js:59)
r @ src\js\getmdl-select.js:59

What could have happened to suddenly stop working?
Thanks

@alexbananabob
Copy link
Collaborator

alexbananabob commented Jan 3, 2018

@anatamburus, give please more information how it happened and how you using getmdl-select.
Thanks

@StartWebSolutions
Copy link

StartWebSolutions commented Jan 3, 2018

Same here, suddenly it does not work

src\js\getmdl-select.js:59 Uncaught TypeError: Cannot set property 'value' of null
    at r (src\js\getmdl-select.js:59)
    at HTMLInputElement.t.onclick (src\js\getmdl-select.js:98)
r @ src\js\getmdl-select.js:59
t.onclick @ src\js\getmdl-select.js:98
2src\js\getmdl-select.js:59 Uncaught TypeError: Cannot set property 'value' of null
    at HTMLBodyElement.r (src\js\getmdl-select.js:59)

Lets me select a value in the list then all values disappear including the one selected.

Version before 29 dec works, loaded that one on local and tested.

@alexbananabob
Copy link
Collaborator

@anatamburus, @StartWebSolutions
Version 2.0 does not have backwards compatibility with older ones. Make sure that you have updated all the files (js, html, css).

@anatamburus
Copy link
Author

anatamburus commented Jan 8, 2018

I found the difference. In the past I used the following structure
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label getmdl-select" style="margin-left: 20px;">
<input class="mdl-textfield__input" id="accountType" name="accountType" type="text" readonly tabIndex="-1"/>
<label class="mdl-textfield__label" for="accountType">Account Type</label>
<ul class="mdl-menu mdl-menu--bottom-left mdl-js-menu" for="accountType">
<li> </li>
<li> </li>
.....
<li> </li>
</ul>
</div>

I looked in the example that with a new version are two inputs, the second hidden.
<input class="mdl-textfield__input" id="accountType" type="text" readonly tabIndex="-1"/>
<input type="hidden" value="" name="accountType">

Apparently I was able to select the data in getmdl-select, but now I have another problem.

On the same page, other inputs that do not use getmdl-select are triggering the error:
Uncaught TypeError: Cannot set property 'value' of null
at HTMLBodyElement.r (src\js\getmdl-select.js:59)
r @ src\js\getmdl-select.js:59

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

3 participants