Skip to content

Commit

Permalink
Fixed popover menu.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjohnsonaz committed Oct 31, 2017
1 parent 33e1f7d commit 32ec054
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/styl/input/input.styl
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@ focus-tight() {
background-color: $input-default-background-color;
border-radius: $input-border-radius;
box-shadow: $input-box-shadow-height-0;
text-decoration: none;
text-align: center;
cursor: pointer;
user-select: none;
transition: opacity 0.3s, box-shadow 0.3s;
// Added for consistency between Button and A tags.
font-size: 100%;
line-height: 1.15;
&:hover:enabled {
color: lighten($input-default-color, $input-color-variance);
background-color: lighten($input-default-background-color, $input-color-variance);
Expand Down
4 changes: 2 additions & 2 deletions test/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,13 @@ <h3>Popover</h3>
</button>

<h3>Popover Menu</h3>
<button class="button popover-trigger popover-closed" id="clickShowPopoverMenu">
<a href="#" class="button popover-trigger popover-closed" id="clickShowPopoverMenu">
<div class="popover-mask"></div>
<div class="popover popover-right popover-align-center">
<div class="popover-content">Popover text</div>
</div>
Popover
</button>
</a>

<h3>Notification</h3>
<aside class="notification notification-success">
Expand Down
3 changes: 3 additions & 0 deletions test/ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ $(function () {
});

$('#clickShowPopoverMenu > .popover').click(function (event) {
event.preventDefault();
event.stopPropagation();
});
var popoverMenuOpen = false;
$('#clickShowPopoverMenu').click(function (event) {
event.preventDefault();
event.stopPropagation();
if (popoverMenuOpen) {
$('#clickShowPopoverMenu').removeClass('button-down').addClass('popover-closed').removeClass('popover-open');
popoverMenuOpen = false;
Expand Down

0 comments on commit 32ec054

Please sign in to comment.