Cancel button is not working in while loop?
I have created user defined custom page and called this page from another function which have while loop.
!define MUI_ABORTWARNING
Function test
${While} $R1 != "1"
call nsDialogsPage
${StrContains} $0 $R0 $Vaules
${If} $0 != ""
StrCpy $R1 "1"
${Else}
MessageBox MB_Ok "wrong input.give valid input"
{EndIf}
${EndWhile}
FunctionEnd

If i click cancel button in the nsDialogsPage,It was displaying warning message only.If the user click the confirmation yes button its not exist,After come out from while loop only cancel working fine.

I dont know why this cancel is not working as expected.
MUI_ABORTWARNING is abnormal termination only.then why this is not working,