The keyboard shortcut Ctrl+W is a very popular one. In terminals, it removes a word. In other applications, it commonly closes a document or tab. As such, it's something you often want to use in applications in ThinLinc, and often press without thinking too much. The problem is that Ctrl+W is generally intercepted by the browser, and closes the Web Access tab, instead of sending it to your application. This is very surprising and disruptive for the user. We already have bug 4755 for tracking how to get this shortcut over to the session. But until that can be resolved, we should look at how we can minimize the disruption the current situation causes.
We used to have some protection for this in the form of a "beforeunload" handler. It was removed in r31661 for bug 5845. That was a vendor drop where we got this upstream commit: https://github.com/novnc/noVNC/commit/3e3eec28f34005b6967c69b2da469fa9b2ea12bc We removed it because the browsers had indicated that it was going away because they considered it too disruptive. It seems they've mellowed a bit and now consider it a legitimate thing for preventing unsaved data to be lost. They still warn that there are many cases where it still isn't shown, though. It could be worth looking at bringing that back. The message is controlled by the browser, and isn't fantastic. But it is hopefully better than the current situation where you have to reopen a tab and log in again.
MDN has some guidelines how this event should be used. And it should not be used the way we used to. So a simple revert is probably not the best approach.