Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(segment): inner div no longer interferes with click events #20522

Merged
merged 2 commits into from Feb 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion core/src/components/segment-button/segment-button.scss
Expand Up @@ -72,6 +72,8 @@
white-space: nowrap;

font-kerning: none;

cursor: pointer;
}

.button-native {
Expand Down Expand Up @@ -107,7 +109,7 @@
background: transparent;

contain: content;
cursor: pointer;
pointer-events: none;

overflow: hidden;

Expand Down
30 changes: 30 additions & 0 deletions core/src/components/segment/test/basic/index.html
Expand Up @@ -164,6 +164,18 @@
</ion-segment-button>
</ion-segment>

<ion-segment>
<ion-segment-button value="active">
<div class="square red"></div>
</ion-segment-button>
<ion-segment-button name="dynamicAttrDisable">
<div class="square green"></div>
</ion-segment-button>
<ion-segment-button value="inactive">
<div class="square blue"></div>
</ion-segment-button>
</ion-segment>

<!-- Dynamic Buttons -->
<ion-segment id="dynamicButtons"></ion-segment>
</div>
Expand Down Expand Up @@ -236,6 +248,24 @@
</ion-content>

<style>
.square {
width: 20px;
height: 20px;
background: black;
}

.square.red {
background: red;
}

.square.green {
background: green;
}

.square.blue {
background: blue;
}

ion-content ion-segment {
margin-bottom: 10px;
}
Expand Down