ActionSheet Outsystems Mobile 11 Customized - Prevent Close on Click

Hi everyone! 


I am using a customized version of the ActionSheet to recreate a slide up popup (similiar to what you see in the facebook app default browser).

Now the only problem is, the default behaviour of that pattern is to close on any click, and according to what i discovered, Ithink this is the culprit:


"function OnTransitionEnd() {
    ActionSheet.classList.remove(actionSheetAnimatableClass);
}
var actionSheetAnimatableClass = 'action-sheet-container--animatable';
var ActionSheet = document.getElementById($parameters.WidgetId);
ActionSheet.classList.add(actionSheetAnimatableClass);

if($parameters.IsOpen){
    ActionSheet.classList.add('action-sheet-container--visible');    
}
else{
    ActionSheet.classList.remove('action-sheet-container--visible');
}

ActionSheet.addEventListener("transitionend", OnTransitionEnd, false);"


Now, my JS skills are a bit rusty, and i am somewhat afraid i may broke something or maybe i am missing something. Does anyone knows the best or any way to fix the close behaviour? My custom Action Sheet also has a placeholder styled for content, ideally, that is where i dont want to auto close.


Update: i got it to work the way i wanted, here is how:

I wrapped the placholders in a css class and used jquery to find that class:

var isUnclosable = $(event.target).parents().hasClass('UnclosableContent');

then i made if statement that only runs the close action if the var is false.

I even added a second placeholder, outside of the wrapped ones to allow the default close on click.


Now i have a pattern with dual behaviour, depending on which placeholder the content is placed.

there are some difference in both