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
We are using:
Ember 3.5.1
Ember-paper version 1.0.0-beta 21
When using a paper-switch into paper-item and the paper-item 'onclick' action is not set, clicking on the switch doesn't fire the switch 'onclick' action. Clicking on the paper-item fires the switch 'onclick' action.
The code I use to reproduce it is from the ember-paper's site
Workaround: extend paper-switch and overwrite the _setupSwitch and _teardownSwitch methods with the old ones:
importPaperSwitchfrom'ember-paper/components/paper-switch';import{run}from'@ember/runloop';exportdefaultPaperSwitch.extend(ColorMixin,{_setupSwitch(){this.set('switchWidth',this.$('.md-thumb-container').innerWidth());letswitchContainer=this.$('.md-container').get(0);letswitchHammer=newHammer(switchContainer);this._switchContainerHammer=switchHammer;// Enable dragging the switch containerswitchHammer.get('pan').set({threshold: 1});switchHammer.on('panstart',run.bind(this,this._dragStart)).on('panmove',run.bind(this,this._drag)).on('panend',run.bind(this,this._dragEnd));// Enable tapping gesture on the switchthis._switchHammer=newHammer(this.element);this._switchHammer.on('tap',run.bind(this,this._dragEnd));this.$('.md-container').on('click',run.bind(this,this._handleNativeClick));},_teardownSwitch(){if(this._switchContainerHammer){this._switchContainerHammer.destroy();this._switchHammer.destroy();}},});
The text was updated successfully, but these errors were encountered:
We are using:
Ember 3.5.1
Ember-paper version 1.0.0-beta 21
When using a paper-switch into paper-item and the paper-item 'onclick' action is not set, clicking on the switch doesn't fire the switch 'onclick' action. Clicking on the paper-item fires the switch 'onclick' action.
The code I use to reproduce it is from the ember-paper's site
The issue is reproducible with this code also.
Reproducible issue can be found here
The issue was introduced with #1007
Workaround: extend paper-switch and overwrite the _setupSwitch and _teardownSwitch methods with the old ones:
The text was updated successfully, but these errors were encountered: