Skip to content
This repository has been archived by the owner on May 16, 2021. It is now read-only.

Bug in $.uniform.restore(); #310

Closed
NishantTTC opened this issue Mar 18, 2013 · 6 comments
Closed

Bug in $.uniform.restore(); #310

NishantTTC opened this issue Mar 18, 2013 · 6 comments

Comments

@NishantTTC
Copy link

There is bug in $.uniform.restore() function. When I execute this function on perticular element, it also removes my HTML element(DOM).
I create one Ordered List and put input element in it.
After this is apply uniform on it.
At some point I want to destroy uniform on this element with $.uniform.restore(), but it removes the HTML elements created by uniform and also removes the whole Ordered List.
Please solve this bug.

@fidian
Copy link
Collaborator

fidian commented Mar 24, 2013

What version of Uniform? Do you have a sample page I can view? jsfiddle or a gist?

Did you try the develop branch?

@NishantTTC
Copy link
Author

I use version 2.0.0
this is the sample: http://jsfiddle.net/Jq3EX/11/
I find the bug, but I think this is not bug but just some checking needed whether the element passed in restore function is applied uniform or not.
In short: I execute the restore function on the element which do not applied the unifrom, lost it's parent elements.
Check the jsfiddle, please select the value two time from dropdown. You'll get it.
In next version just add support for restore function that whether the element passed in restore function is applied uniform or not.

Additional:
I got error in your uniform.js on line 4 for /.
You didn't use /* comment you use simply /. Please check this whether I'm right or not.

@fidian
Copy link
Collaborator

fidian commented Mar 25, 2013

If calling $('elements').uniform.restore() can mess with non-uniformed elements, then this is certainly a bug. I'll look into this.

@NishantTTC
Copy link
Author

Waiting for your next release...
Additional Changes Required in next version:
Can you add Unorderd List for select element in your plugin.
The Reason is we can't apply css style to OPTION tag, so sometimes it looks oldish.

@fidian
Copy link
Collaborator

fidian commented Mar 27, 2013

2.1.1 has been released. It's up on the website and you can play with it in jsfiddle: http://jsfiddle.net/fidian/JNCFP/

It looks like $.uniform.restore() will not destory non-uniformed elements, but would you double check that for me? I did notice more problems and will open separate bugs for them today.

Comments do not need to be /** unless they are docblock format. I don't see a comment starting on line 4 - the first several lines are one big comment explaining the plugin. It runs from line 1 to line 27.

I believe the unordered list feature you're talking about is related to #186 (updating the select system to allow that to be themed). I don't have any plans to do that, but this is also not my project and anyone can contribute code to implement that feature.

@NishantTTC
Copy link
Author

Thanks for informing.
I'll surely check it for all elements and inform you if there is any bug.

I get on error for comment, that's why I inform you. Even I don't know why it's show me an error.

If I have any updation idea for this project, I'll surely do it.

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

No branches or pull requests

2 participants