use $timeout() instead of $$digest() to fix keyboard + mouse operation issue.