angular / material

Material design for AngularJS
https://material.angularjs.org/
MIT License
16.55k stars 3.39k forks source link

Event handling error when angular-material wrapped in Ionic view. #942

Closed jeffthompson1971 closed 9 years ago

jeffthompson1971 commented 9 years ago

Saw this a while back... was hoping by now somehow magically this was no longer an issue. But I see it again today. I have a 'supersonic' (appgyver) hybrid app, and I am using ionic for the nav-bar and navigation functionality. I really want to use material design though for the forms elements and such. And the form elements render OK, BUT clicking on any of the form elements throws this error. Seems ionic is choking when events are generated by angularMaterial components:

UNSPECIFIED_EVENT_TYPE_ERR: DOM Events Exception 0: The Event's type was not specified by initializing the event before the method was called. dispatchEventcommon.js:37572:409 ncommon.js:37572:409 tcommon.js:37572:229 lcommon.js:37572:1460

NOTE that this common' file is a concat'ed file with ionic.js in there of course. Looks like it's right in this bit below. Anyway, question is .. is there a way to stop events in an angularMaterial form from propagating? This error is preventing me form submitting my form or doing any actions on control taps etc. Anyone see this?

function i(e) { return ("submit" != e.target.type || 0 !== e.detail) && (ionic.scroll.isScrolling && ionic.tap.containsOrIsTextInput(e.target) ||!e.isIonicTap&&!ionic.tap.requiresNativeClick(e.target)) ? (e.stopPropagation(), ionic.tap.isLabelWithTextInput(e.target) || e.preventDefault(), !1) : void 0 }

ThomasBurleson commented 9 years ago

See my comments in Issue 892