Enhances document link click handling, consistent with browser's default behavior.