This has to do with the preserve-inputs
package. From the Meteor Docs:
By default, new Meteor apps automatically include the preserve-inputs package. This preserves all elements of type input, textarea, button, select, and option that have unique id attributes or that have name attributes that are unique within an enclosing element with an id attribute. To turn off this default behavior, simply remove the preserve-inputs package.
So basically because your button has a name
attribute, Meteor is preventing it from changing when the template is re-rendered. There are three ways you can solve this:
Simply remove the
name
attribute from yourinput.sort
attribute.Remove the
preserve-inputs
package (not recommended if you're using the current template engine).You can use the preview release of the new Meteor template engine, which no longer needs the
preserve-inputs
package because it automatically does more fine-grained DOM updates. You can run the app once with the preview release using:meteor --release shark-1-29-2014-e
Or you can tell Meteor to update your app to this version by running:
meteor update --release shark-1-29-2014-e
Note that this new templating engine will be included in the Meteor core release by 1.0.