ColReorder 1.0.5 and event management
ColReorder 1.0.5 and event management
Hi everyone,
I've seen a line in ColReorder that stops the propagation of a mousedown event on a th :
[code]
/**
* Add a mouse down listener to a particluar TH element
* @method _fnMouseListener
* @param int i Column index
* @param element nTh TH element clicked on
* @returns void
* @private
*/
"_fnMouseListener": function ( i, nTh )
{
var that = this;
$(nTh).bind( 'mousedown.ColReorder', function (e) {
that._fnMouseDown.call(that, e, nTh);
return false;
} );
},
[/code]
Return false == Prevent Default & Stop Propagation.
Since this behavior do only happen using ColReorder plugin, my question is :
Why is there a return false on that function, because i need that event to bubble and not be stopped.
So, I've commented that line out recently but I was wondering if it was there for a huge purpose :)
I don't wanna break anything so,
Can anyone tell me if it's mandatory or not ?
Regards,
I've seen a line in ColReorder that stops the propagation of a mousedown event on a th :
[code]
/**
* Add a mouse down listener to a particluar TH element
* @method _fnMouseListener
* @param int i Column index
* @param element nTh TH element clicked on
* @returns void
* @private
*/
"_fnMouseListener": function ( i, nTh )
{
var that = this;
$(nTh).bind( 'mousedown.ColReorder', function (e) {
that._fnMouseDown.call(that, e, nTh);
return false;
} );
},
[/code]
Return false == Prevent Default & Stop Propagation.
Since this behavior do only happen using ColReorder plugin, my question is :
Why is there a return false on that function, because i need that event to bubble and not be stopped.
So, I've commented that line out recently but I was wondering if it was there for a huge purpose :)
I don't wanna break anything so,
Can anyone tell me if it's mandatory or not ?
Regards,
This discussion has been closed.
Replies
Regards,
Allan
Thanks very much for your really quick answer.
Exactly what I needed to hear ;)
Have a good day!