Closed muradsofiyev closed 7 years ago
Hi @muradsofiyev!
Would you please modify this demo to show the problem being described?
Hey i find problem http://jsfiddle.net/u5kuwxuk/ watch this example your plugin call my modal hidden event
I still don't understand the issue. Please describe the problem, and what steps are needed to perform to reproduce it.
You need to give your
On Sat, Jun 3, 2017 at 8:15 AM Rob Garrison notifications@github.com wrote:
I still don't understand the issue. Please describe the problem, and what steps are needed to perform to reproduce it.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Mottie/Keyboard/issues/566#issuecomment-305971384, or mute the thread https://github.com/notifications/unsubscribe-auth/AHyz2xC-bioQ7wnDREbsKOEGNDujjS_oks5sAU5VgaJpZM4NuREP .
When i accepted keyboard keyboard close but my modal close event listener (hidden.bs.modal) run You see that open your console http://jsfiddle.net/u5kuwxuk/ this example and accept keyboard
Ok, I understand now... sorry it took me so long to respond.
The problem is that the keyboard triggers a hidden
event when it hides, and Bootstrap triggers a hidden.bs.modal
to show that the modal was hidden.
You can solve this issue in two ways:
Change the keyboard event that is triggered when it is hidden (docs):
$.keyboard.events.kbHidden = "keyboardHidden";
Because jQuery uses namespacing, any characters after the first period in the event will be added as a namespace. Therefore, check the namespace of the event before executing any code (demo):
$("#myModal").on('hidden.bs.modal', function(event) {
if (event.namespace === 'bs.modal') {
console.log('hello world');
}
});
I'm guessing this issue has been resolved, so I'm going to close it. If you continue to have problems, please feel free to continue the discussion in this thread.
When I'm accepted keyboard resets all input