From 4d0b593a65bddf083fdc6923d07131506b28ba19 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Wed, 22 May 2019 11:01:51 -0400 Subject: [PATCH 1/3] fix(button): do not apply a width if there is button text with an icon fixes #18329 --- core/src/components/button/button.tsx | 2 +- .../components/toolbar/test/spec/index.html | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/core/src/components/button/button.tsx b/core/src/components/button/button.tsx index 0d3166bde7b..10493a8b309 100644 --- a/core/src/components/button/button.tsx +++ b/core/src/components/button/button.tsx @@ -135,7 +135,7 @@ export class Button implements ComponentInterface { } private get hasIcon() { - return !!this.el.querySelector('ion-icon'); + return !!this.el.querySelector('ion-icon[slot="icon-only"]'); } private get hasIconOnly() { diff --git a/core/src/components/toolbar/test/spec/index.html b/core/src/components/toolbar/test/spec/index.html index 439b5b8dd97..280d7d07e57 100644 --- a/core/src/components/toolbar/test/spec/index.html +++ b/core/src/components/toolbar/test/spec/index.html @@ -242,6 +242,36 @@ + + + + Click to Add Text + + + + + + + + + + +