mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 23:16:52 +08:00
@ -66,15 +66,12 @@ ion-backdrop {
|
||||
.menu-content-open {
|
||||
cursor: pointer;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
|
||||
.menu-content-open {
|
||||
// the containing element itself should be clickable but
|
||||
// everything inside of it should not clickable when menu is open
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 340px) {
|
||||
|
||||
.menu-inner {
|
||||
|
||||
@ -214,13 +214,18 @@ export class Menu {
|
||||
|
||||
@Listen('body:click', { enabled: false, capture: true })
|
||||
onBackdropClick(ev: any) {
|
||||
const path = ev.path;
|
||||
if (path && !path.includes(this.menuInnerEl) && this.lastOnEnd < ev.timeStamp - 100) {
|
||||
if (this.lastOnEnd < ev.timeStamp - 100) {
|
||||
const shouldClose = (ev.composedPath)
|
||||
? !ev.composedPath().includes(this.menuInnerEl)
|
||||
: false;
|
||||
|
||||
if (shouldClose) {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
this.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Method()
|
||||
isOpen(): boolean {
|
||||
@ -481,7 +486,6 @@ export class Menu {
|
||||
<div
|
||||
class="menu-inner"
|
||||
ref={el => this.menuInnerEl = el}
|
||||
onClick={this.onBackdropClick.bind(this)}
|
||||
>
|
||||
<slot></slot>
|
||||
</div>,
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
// Split Pane
|
||||
// --------------------------------------------------
|
||||
|
||||
.split-pane-ios.split-pane-visible > .split-pane-side[side=start] {
|
||||
.split-pane-ios.split-pane-visible > .split-pane-side {
|
||||
min-width: $split-pane-ios-side-min-width;
|
||||
max-width: $split-pane-ios-side-max-width;
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
// Split Pane
|
||||
// --------------------------------------------------
|
||||
|
||||
.split-pane-md.split-pane-visible > .split-pane-side[side=start] {
|
||||
.split-pane-md.split-pane-visible > .split-pane-side {
|
||||
min-width: $split-pane-md-side-min-width;
|
||||
max-width: $split-pane-md-side-max-width;
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.split-pane-visible > .split-pane-side[side=start] {
|
||||
.split-pane-visible > .split-pane-side {
|
||||
order: -1;
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<ion-app>
|
||||
<ion-split-pane id="splitPane">
|
||||
|
||||
<ion-menu side="end">
|
||||
<ion-menu side="start">
|
||||
|
||||
<ion-header>
|
||||
<ion-toolbar color="secondary">
|
||||
|
||||
Reference in New Issue
Block a user