kirstein / angular-autodisable

ngAutodisable directive for angular. Automatic disable for buttons rocks!
http://jsfiddle.net/kirstein/wXnks/embedded/result/
MIT License
63 stars 26 forks source link

jqLite's find() is limited to lookups by tag name #20

Open juliekoubova opened 8 years ago

juliekoubova commented 8 years ago

therefore, this snippet never finds any buttons to disable

          handler = handlerInstance(element.find('button[type=submit]'),
              SUBMIT_EVENT,
              getLoadingClass(attrs),
              getCallbacks(attrs[SUBMIT_ATTR]));

maybe you could use something like element[0].querySelectorAll('button[type=submit]') instead?

mburgosh commented 8 years ago

The test scope is depending on jquery for some helpful features. Could you implement your idea and make a pull request?