vestman / Select-or-Die

Yet another jQuery plugin to style select elements. Demo at http://vst.mn/selectordie/
MIT License
524 stars 133 forks source link

Problems when navigating back or forward in Chrome #29

Open Moorst opened 9 years ago

Moorst commented 9 years ago

For some reason, when you navigate back or forward in chrome, some of the select fields break. This is even happening on your demo site.

To reproduce:

You'll notice then that the first select on your demo page is empty.

image

If you click this select, you'll notice the error "Uncaught TypeError: Cannot read property 'getBoundingClientRect' of undefined" in the console

image

The rest of the selects work, other than the one in the "Disable / Enable" section. If you click on this select, you get another error "Uncaught TypeError: Cannot set property 'nodeValue' of null".

image

purpleweb commented 9 years ago

I have exactly the same issue. Is there a solution ? Thx

Moorst commented 9 years ago

I haven't been able to find one :(

lukechapman commented 8 years ago

@tonioMtl @Moorst -- did you guys ever find a solution to this?

vestman commented 8 years ago

@lukechapman , @tonioMtl, @Moorst, I'll push a fix in a day or two. I've rewritten the way the placeholder is shown and that seems to have fixed the issue.

Here's a test I uploaded a day or two ago: http://vst.mn/selectordie_tmp/?test

In the minified JS above there's a couple of other changes and some tmp code, so if you can wait I'll push the fix in a day or two.

lukechapman commented 8 years ago

@vestman Thanks a bunch! I just actually came back to say I found a way to fix it (for me it seemed to be a result of no value attribute being set on the first option element) but I'll definitely wait till your fix!

sfacs commented 6 years ago

I'm having the same issue, and the first option element has a value set. The link @vestman posted seem dead, and it seems this never got pushed to master. If you happen to still have the fix I would greatly appreciate it! Thanks!