diff --git a/ionic/components/button/button.ts b/ionic/components/button/button.ts index 346c6f0546..9a56fff577 100644 --- a/ionic/components/button/button.ts +++ b/ionic/components/button/button.ts @@ -20,11 +20,7 @@ export class Button { let element = elementRef.nativeElement; if (config.get('hoverCSS') === false) { - element.classList.add('disable-hover'); - } - - if (type) { - renderer.setElementAttribute(elementRef, type, ''); + renderer.setElementClass(elementRef, 'disable-hover', true); } if (element.hasAttribute('ion-item')) { @@ -32,6 +28,10 @@ export class Button { return; } + if (type) { + renderer.setElementAttribute(elementRef, type, ''); + } + // figure out if and where the icon lives in the button let childNodes = element.childNodes; let childNode; diff --git a/ionic/components/button/test/block/main.html b/ionic/components/button/test/block/main.html index e440bc75de..b99513a59d 100644 --- a/ionic/components/button/test/block/main.html +++ b/ionic/components/button/test/block/main.html @@ -10,6 +10,11 @@
+
+