(function(){

var mi2 = mi2JS;

mi2._xClickCancel = function(el){
	
	// if disabled at any level 
	if(el.hasAttribute(mi2JS.disabledAttribute)) return true;
	
	// do not mess with other components
	comp = el.getAttribute('as');
	return (comp && el != this.el && !(comp == 'Base' || comp =='Base' )); 
};

mi2._xClickEventData = function(el,evt, end){
	var evtNames = [], actions = [], comp, cancelClick = false;
	while(true){
		if(mi2._xClickCancel(el)) cancelClick = true;

		if(el.hasAttribute('event')) evtNames.push(el.getAttribute('event'));
		if(el.hasAttribute('action')) actions.push(el.getAttribute('action'));

		if(el == end) break;
		el = el.parentNode;
	}

	actions.push('default');
	
	return {
			action:actions[0],
			actions:actions,
			events:evtNames,
			name: evtNames[0],
			domEvent: evt,
			cancelClick: cancelClick,
			target: el,
			required: true,
			fireTo: 'parent'
		};
};

mi2._xClickListen = function(n, options, updaters, parentComp){
	if(!parentComp) return;
	parentComp.listen(n,'click',function(evt){
		var evtData = mi2._xClickEventData(evt.target, evt,n);
		var context;
		var attrValue = options._;
		if(typeof attrValue == 'function'){
			context = attrValue(evt, evtData.action);
		}else if(typeof attrValue == 'string'){
			evtData.name = attrValue;
		}

		evtData.context = context;

		// WORKAROUND to be compatible with base/Button
		// changing fireEvent recognitionf of skipping the initiator component
		// would break base/Button behavior, so this trick is used to make it work along
		evtData.__src = parentComp;

		if(evtData.name && !evt.cancelClick){
			parentComp.fireEvent(evtData);
		} 

//		parentComp.fireEvent('');
	});
}

mi2.registerDirective('x-click', function(el, comp, options, updaters, parentComp){
	if(comp) throw new Error('x-click not supported on component nodes');
	mi2._xClickListen(el, options, updaters, parentComp);
});

})();
@@ -1028,16 +1028,24 @@
 n(evt)%7B%0A
+%09%09try%7B%0A%09
 %09%09var ev
@@ -1091,24 +1091,25 @@
 , evt,n);%0A%09%09
+%09
 var context;
@@ -1109,16 +1109,17 @@
 ontext;%0A
+%09
 %09%09var at
@@ -1139,16 +1139,17 @@
 ions._;%0A
+%09
 %09%09if(typ
@@ -1181,16 +1181,17 @@
 n')%7B%0A%09%09%09
+%09
 context 
@@ -1226,16 +1226,17 @@
 ion);%0A%09%09
+%09
 %7Delse if
@@ -1267,16 +1267,17 @@
 ring')%7B%0A
+%09
 %09%09%09evtDa
@@ -1299,19 +1299,21 @@
 alue;%0A%09%09
+%09
 %7D%0A%0A
+%09
 %09%09evtDat
@@ -1334,16 +1334,17 @@
 ntext;%0A%0A
+%09
 %09%09// WOR
@@ -1387,16 +1387,17 @@
 utton%0A%09%09
+%09
 // chang
@@ -1459,16 +1459,17 @@
 mponent%0A
+%09
 %09%09// wou
@@ -1543,16 +1543,17 @@
 k along%0A
+%09
 %09%09evtDat
@@ -1573,24 +1573,25 @@
 entComp;%0A%0A%09%09
+%09
 if(evtData.n
@@ -1616,16 +1616,17 @@
 Click)%7B%0A
+%09
 %09%09%09paren
@@ -1657,41 +1657,172 @@
 ;%0A%09%09
+%09
 %7D %0A%0A
-//%09%09parentComp.fireEvent('');
+%09%09%7Dcatch(e)%7B%0A%09%09%09console.log('problem activating click on ', '%5Cntarget',evt.target, '%5Cnoptions', options, '%5Cnparent', parentComp, '%5Cnevt',evt);%0A%09%09%09throw e;%0A%09%09%7D%09
 %0A%09%7D)

Update x-click.js