Fixing bug where scroll top of dialog doesn't take into account document's scrollTop