Experiencing this issue with my stay open enhanced applet created with SD 8. The continue quit statement in the on quit handler seems to call the quit handler. It doesn’t do so recursively; it only calls the quit handler the first time it is executed. The second time it executes it doesn’t call the quit handler again, but it doesn’t seem to actually quit either. The applet if launched from Finder/the Doc (outside SD 8) will remain open after quitting.
Try this as a demo stay open enhanced applet in SD 8.
use AppleScript version "2.4" -- Yosemite (10.10) or later use scripting additions on run say "running" quit end run on quit say "quitting" if (name of current application as text) is "Script Editor" or (name of current application as text) is "Script Debugger" then say "user cancelled error" error number -128 else say "continue quit" continue quit end if end quit