question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: Menu can be opened behind Modal with custom Animation

See original GitHub issue

Bug Report

Ionic version:

[x] 5.x

Current behavior:

I opened the Issue #20467 some time ago, because i was able to open the Side Menu via Gesture behind a Modal. This was fixed, but i just noticed that it still works for Modals which opens with a custom Animation.

I open a Modal with a own Fade-In Effect and while this Modal is open i can swipe the Menu in, which can be seen after the Modal is dismissed.

Expected behavior:

The Menu should generally not be possible to open when a Modal is open.

Other information:

Ionic info:

Ionic:

   Ionic CLI                     : 6.2.2 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.0.5
   @angular-devkit/build-angular : 0.803.25
   @angular-devkit/schematics    : 8.3.25
   @angular/cli                  : 8.3.25
   @ionic/angular-toolkit        : 2.2.0

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0, ios 5.1.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 53 other plugins)

Utility:

   cordova-res : 0.10.0
   native-run  : 0.3.0

System:

   Android SDK Tools : 25.2.3 (/Users/hanskrywalsky/Library/Android/sdk)
   ios-deploy        : 1.10.0
   ios-sim           : 8.0.2
   NodeJS            : v12.16.1 (/usr/local/bin/node)
   npm               : 6.14.3
   OS                : macOS Catalina
   Xcode             : Xcode 11.3.1 Build version 11C504

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
liamdebeasicommented, Mar 20, 2020

Actually I changed my mind. It’s not a bug, but Ionic Framework should probably add the show-modal class regardless of the animation on the modal. I’ll re-open and create a PR for this. 😄

1reaction
liamdebeasicommented, Mar 20, 2020

Thanks for the issue. I am going to close this as this is not a bug in Ionic Framework. The built in modals use a show-modal class to indicate that they are “presented”. You will need to do the same with your custom animations.

Also, your fade out animation needs to account for the translate you added in your fade in.

I recommend you either use

.beforeStyles({
  transform: transformValue
})

on your fade in animation, or set the transform value using CSS. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap Modal sitting behind backdrop - Stack Overflow
Just move the entire modal outside of the rest of your code, to the very bottom. It doesn't need to be nested in...
Read more >
Bootstrap Modal Dialog showing under Modal Background
The easiest solution is to move the modal dialog outside of any container and just declare it under the <body> element, or -...
Read more >
How to design Animated Sidebar/Modal in figma - YouTube
In this video, I'll show how we can create a sidebar and modal (popup) animation in a real prototype, step by step with...
Read more >
Modal Animations - CodePen
Most of the time these slide in or fade in - just playing with other instantiation animations. All animations are class-driven, and are...
Read more >
Modal - Bootstrap
Use Bootstrap's JavaScript modal plugin to add dialogs to your site for lightboxes, user notifications, or completely custom content.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found