added code to close inline widgets when switching between default and response mode (issue28)