-
Notifications
You must be signed in to change notification settings - Fork 77
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
Clicking outside picker doesnt close it when called from floated element #72
Comments
+1 |
Hi @primvla and @mscreenie , Other than that you might want to set the width and height of the document.body to it max. In the default setting he body listens to a mousedown but if it doesn't cover the browser screen it doesn't work. But better first try to set the "body" to window... |
Is it possible to set multiple containers. As I have an iframe and the events do not recurse down into it. |
Hi @mscreenie , so if you need to deal with iFrames you might want to set an event listener in your iFrame as well: // make an instance
var myColorPicker = $('.color').colorPicker();
// add listener to iframes...
$('iframe').contents().on('touchstart.tcp mousedown.tcp pointerdown.tcp', function(e) {
myColorPicker.colorPicker.toggle();
}); This listens to pointer activity inside an iFrame and handles to close the picker from there as clicking there also means that you didn't click on the picker nor inside a input field. If you ever have to deal with darg&drop over iFrames you might experience the same problem as your event listener stops working over the iFrame... |
It has some problems with areas where outside click doesn't close the picker, that is, when the picker is called from floated content. Firefox 48 on linux.
The text was updated successfully, but these errors were encountered: