anchor.diff:    if FAsyncDestroy then
       ExecuteJS('AsyncDestroyControl("'+HTMLName+'");');
   
  -  IWBSCleanSafeCallBacks(Self);
     inherited;
   end;
   
   procedure TIWBSCustomRegion.Release;
  +var
  +  IWApp: TIWApplication;
   begin
     FReleased := True;
  +  Hide;
  +
  +  IWApp := GetWebApplication;
  +  if IWApp <> nil then
  +    if Parent is TFrame then
  +      IWApp.ReleaseForm(Parent)
  +    else
  +      IWApp.ReleaseForm(Self);
   end;
   
   function TIWBSCustomRegion.GetWebApplication: TIWApplication;
  
positive.code:   end;
    if Assigned(FOnAsyncHide) or FDestroyOnHide then begin
      ABuffer.WriteLine('$("#'+xHTMLName+'").on("hidden.bs.modal", function(e){ executeAjaxEvent("", null, "'+xHTMLName+'.DoOnAsyncHide", true, null, true); });');
      IWBSRegisterSafeCallBack(xHTMLName+'.DoOnAsyncHide', Self, DoOnAsyncHide);
    end;
    if FModalVisible then
      ABuffer.WriteLine(GetShowScript);
  
negative.code: 
  function IWBSFindParentInputForm(AParent: TControl): TIWBSInputForm;
  
  implementation
  
  uses IWForm, IWUtils, IWContainerLayout, IWBSUtils;
  
  {$region 'help functions'}
  function IWBSFindParentInputForm(AParent: TControl): TIWBSInputForm;
  