We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In following cases toggles don't work:
<a id="toggle">Some text <img src="someimage.png"/></a>
there is no event.preventDefault, when clicking on the img, so the page is reloaded
<div id="toggle">Some text <img src="someimage.png"/></div>
In this case, the calendar cannot be closed not at all.
The problematic code is on both cases picker.atach.js:
in first case event.stop(); is not executed:, because tag = img
var getOpenEvent = function(element){ return function(event){ var tag = event.target.get('tag'); if (tag == 'input' && event.type == 'click' && !element.match(':focus') || (self.opened && self.input == element)) return; if (tag == 'a') event.stop(); self.position(element); self.open(); self.fireEvent('attached', [event, element]); }; };
in second case the close function has no effect, because here isA is always false
var closeEvent = function(event){ var stopInput = self.options.blockKeydown && event.type == 'keydown' && !(['tab', 'esc'].contains(event.key)), isCloseKey = event.type == 'keydown' && (['tab', 'esc'].contains(event.key)), isA = event.target.get('tag') == 'a';
if (stopInput || isA) event.preventDefault(); if (isCloseKey || isA) self.close(); };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In following cases toggles don't work:
<a id="toggle">Some text <img src="someimage.png"/></a>
there is no event.preventDefault, when clicking on the img, so the page is reloaded
<div id="toggle">Some text <img src="someimage.png"/></div>
In this case, the calendar cannot be closed not at all.
The problematic code is on both cases picker.atach.js:
in first case event.stop(); is not executed:, because tag = img
var getOpenEvent = function(element){
return function(event){
var tag = event.target.get('tag');
if (tag == 'input' && event.type == 'click' && !element.match(':focus') || (self.opened && self.input == element)) return;
if (tag == 'a') event.stop();
self.position(element);
self.open();
self.fireEvent('attached', [event, element]);
};
};
in second case the close function has no effect, because here isA is always false
var closeEvent = function(event){
var stopInput = self.options.blockKeydown
&& event.type == 'keydown'
&& !(['tab', 'esc'].contains(event.key)),
isCloseKey = event.type == 'keydown'
&& (['tab', 'esc'].contains(event.key)),
isA = event.target.get('tag') == 'a';
The text was updated successfully, but these errors were encountered: