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

Unable to select month/year via selector in the titlebar #224

Closed
rbtbar opened this issue Dec 19, 2014 · 1 comment
Closed

Unable to select month/year via selector in the titlebar #224

rbtbar opened this issue Dec 19, 2014 · 1 comment

Comments

@rbtbar
Copy link

rbtbar commented Dec 19, 2014

Hi,

Please check the following jsfiddle demo:
just click on the month/year selector and the calendar is immediately closed.

month-year-selection-bug

As far I can tell, the bug is in the _onClick function, that checks whether the clicked element is owned by the trigger:

if (self._v && pEl !== opts.trigger) { // UUUPSSS: neither pika-select nor its parents belong to the trigger
self.hide();
}

The bug is related to the changes introduced to solve the following issue: #188

Best Regards,
Robert

radiac added a commit to radiac/Pikaday that referenced this issue Jan 12, 2015
In IE, a click in the pika div will make the input field lose focus. Previously, _onInputBlur did not test for this, so a click in the pika div would result in it closing.

This commit adds a check to see if document.activeElement is within the pika div, and if so does not allow pika to hide. IE sets this variable to the newly-focused element before the blur event fires;

IE sets document.activeElement to the newly-focused element before the blur event fires; this commit adds a check to see if the clicked element is within the pika div, and if so ignores the blur event. Other browsers correctly set the focused element to body before blur, so will not be affected by this change.

Tested in IE 7 (Win XP), 8-10 (Win 7), 11 (Win 8), latest firefox, chrome, opera
@Freyskeyd
Copy link

i'm experiencing the same problem.

rikkert added a commit that referenced this issue Jan 13, 2015
Fix for bug introduced in #166; fixes #224, #230
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants