meteor-viewmodel icon indicating copy to clipboard operation
meteor-viewmodel copied to clipboard

Change even not functional

Open KoenLav opened this issue 9 years ago • 2 comments

After removing the jQuery dependency the change event on selects is no longer fully functional (when using Materialize, or any other package which wraps selects, for that matter).

jQuery change will listen for any change (even programatically) on the original element, whereas pure Javascript change will only listen fire when a change is accompanied by a change of focus (which does not occur when a select is changed programatically).

http://stackoverflow.com/questions/7055729/onchange-event-not-fire-when-the-change-come-from-antoher-function

Suggested fix: allow jQuery to be used by setting addBinding)){ jQuery: true })

KoenLav avatar Mar 22 '16 09:03 KoenLav

I think a better fix would be triggering the change event manually inside the binding. What do you think?

dalgard avatar Mar 27 '16 09:03 dalgard

Well it depends. If you want to loose jQuery as a dependency, which I understand, you also loose some functionality.

jQuery is pretty 'default' in Meteor, so I think most people would Epe expect it to be possible to use jQuery bindings

KoenLav avatar Mar 27 '16 09:03 KoenLav