You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think i found the issue within stickit plugin, which leads to unexpected behavior with the DOM.
Preconditions:
I've gotten dropdown with some options hidden, that's disabled = true. After change of model, the state of dropdown changes, and after the update, the state of my options with disabled state is being reseted.
Take a look to the line #581: $el.find('*').remove();
I'm just wondering, why you are doing wipe of all options from the select and then recreating them, if the only thing we need is to select another option on backbone.model.set() event.
I think, normally, you shouldn't affect the state of css, binded events to DOM, or the overal state of attributes except the attribute you need to update.
The text was updated successfully, but these errors were encountered:
sergey-dev
added a commit
to sergey-dev/backbone.stickit
that referenced
this issue
Sep 29, 2014
Here's the provided fix from my side.
it will not wipe the state of attributes like CSS, disabled states, HTML5 data attributes..
Each time we kill all the dropdowns content in line #581: $el.find('*').remove(); each option's CSS, and other attributes will be preserved, and restored.
Two way bindings works as it worked before, this way we just do not wiping the state of options' attributes on simple sync from backbone.model.set() -> view.
I'm also having this issue and I consider it a big issue: as a user I dont expect that the binding library to resent all my attributes - style, etc. If viable, please accept @sergey-dev PL ! A working example of the issue:
I think i found the issue within stickit plugin, which leads to unexpected behavior with the DOM.
Preconditions:
I've gotten dropdown with some options hidden, that's
disabled = true
. After change of model, the state of dropdown changes, and after the update, the state of my options with disabled state is being reseted.Take a look to the line #581:
$el.find('*').remove();
I'm just wondering, why you are doing wipe of all options from the select and then recreating them, if the only thing we need is to select another option on backbone.model.set() event.
I think, normally, you shouldn't affect the state of css, binded events to DOM, or the overal state of attributes except the attribute you need to update.
The text was updated successfully, but these errors were encountered: