mootools-datepicker icon indicating copy to clipboard operation
mootools-datepicker copied to clipboard

Toggle is not working with sub elements

Open jarkt opened this issue 6 years ago • 0 comments

Toggling doesn't work on click on sub elements.

<span id="toggle">That works</span>
<span id="toggle"><span>That doesn't work</span></span>

As a workaround I tried to open the calendar manually by register a click event on the toggle element and call the open or show method. That does also not work. There is crazy code in the Picker.Attach.js line 34 which closes the calendar on every click in the page immediately.

var documentEvent = function(event){
	if (this.attachedElements.contains(event.target)) return;
	this.close();
}.bind(this);
var document = this.picker.getDocument().addEvent('click', documentEvent);

jarkt avatar Feb 15 '19 23:02 jarkt