[[ Bugfix 13548 ]] Fix calculation for tab-on-return
Merge pull request #1229 from runrevfraser/bugfix-13548

[[ Bugfix 13548 ]] Fix calculation for tab-on-return