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

i'm trying to get double modal without error #57

Open
nopinokio opened this issue Oct 16, 2023 · 1 comment
Open

i'm trying to get double modal without error #57

nopinokio opened this issue Oct 16, 2023 · 1 comment

Comments

@nopinokio
Copy link

nopinokio commented Oct 16, 2023

i'm trying to get double modal without error but it is not easy...
i tried removeClass when the modal closing is related but there is some error when i open again after closing the modal..
and using esc key as well.

the issue step1.
open myBiz/test.html

the issue step2.
click this button

<button type="button" class="btn btn-l btn-black js-offcanvas-trigger" data-offcanvas-trigger="offcanvas-bank-1">계좌내역등록</button>

the issue step3.
click this button
Then you'll be able to see the double modal.

<button class="btn btn-s btn-solid-black js-offcanvas-trigger" data-offcanvas-trigger="offcanvas-file-form" data-offcanvas-double="true">등록</button>
could you help me please?

test_script.zip

@vmitsaras
Copy link
Owner

You can try this simple solution:
if(dataDouble !== undefined && dataDouble == "true"){

		// if clicked button has data-offcanvas-double="true", close all offcanvas
		$('.js-offcanvas.is-open').data('offcanvas-component').close();

	} else {
		
	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants