forked from missive/emoji-mart
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Unable to close the emoji picker after clicking outside it #63
Comments
It would be good if there was a simple 'x' on the pop up to close the modal. Can this be easily done? |
This can easily be done with placing a div that gets displayed when you toggle the picker. <div
class="modal-container"
v-show="showEmojiPicker"
@click="toggleEmojiPicker"></div> .modal-container {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1010;
} And then adjust the z-index of the emoji-mart container. Which I think by default is 1 or 2. .emoji-mart {
z-index: 1020;
} |
@eakenbor I did the followings and it worked smoothly.
Here is the emoji picker component which is toggled by icon button
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have tried using custom vue directives to close the modal upon clicking outside it but does not work as the event is triggered prematurely irrespective of the root element it is placed. Is there any inbuilt custom event for this? Or anyway around it?
The text was updated successfully, but these errors were encountered: