This project is archived and is in readonly mode.

#504 ✓resolved

Event not available in Mask onClick

Reported by Romo | February 3rd, 2011 @ 10:17 AM | in

in the onClick handler for the Mask class, the original click-event isn't passed through. However, one may need this to determine where on the mask (i.e. left or right hand side of the mask) was clicked.

Solution: replace Mask.render with the following code:

render: function() {

    this.element = new Element('div', {
        'class': this.options['class'],
        id: || 'mask-' + $time(),
        styles: $merge(, {
            display: 'none'
        events: {
            click: function(e){
                this.fireEvent('click', e);
                if (this.options.hideOnClick) this.hide();
    this.hidden = true;

Only thing changed is the click handler for the mask. It now fetches the Event, and inserts it in the call to fireEvent.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions

People watching this ticket