it looks like it should be well known issue but I haven't found answer anywhere. Please tell me why the result (after clicking) of this:
Button["X", Print@1; Pause@1; Print@2;]
is different from result of this:
Print@1; Pause@1; Print@2;
The reason is because
You can replicate the behavior of
by adding the option
This ensures the actions are performed in the current queue and no time limit is enforced.
See the documentation under "Details and Options"