# How Do I Prevent the System from Setting Focus to a Widget After an Error?

When a service receives an error and shows a message after calling a back-end service, the browser attempts to set focus to the relevant widget in error. If you do not need this behavior, you can define the TabMenu variable `dontSetFocusOnError` to `true`.

Example:

    			var dontSetFocusOnError = true;

Parent topic: Miscellaneous How-To's
Parent topic: How-To