Contributions > Plugins, tips, and tricks
Disable popup chat window focusing
(1/1)
bobscan:
When there are multiple chats open and a client replies, their chat window takes focus. This can be painfully frustrating if you have multiple chat windows open and trying to respond to multiple clients.
change:
/libs/common.php (distro default line 470 )
--- Code: ---return "<a href=\"$href\" target=\"_blank\" " . ($title ? "title=\"$title\" " : "") . "onclick=\"if(navigator.userAgent.toLowerCase().indexOf('opera') != -1 && window.event.preventDefault) window.event.preventDefault();this.newWindow = window.open($jshref, '$wndName', '$options');this.newWindow.focus();this.newWindow.opener=window;return false;\">$message</a>";
--- End code ---
remove this bit in the line, make sure to leave only one semicolon between the remaining calls.
--- Code: ---this.newWindow.focus();
--- End code ---
so it will now read:
--- Code: ---return "<a href=\"$href\" target=\"_blank\" " . ($title ? "title=\"$title\" " : "") . "onclick=\"if(navigator.userAgent.toLowerCase().indexOf('opera') != -1 && window.event.preventDefault) window.event.preventDefault();this.newWindow = window.open($jshref, '$wndName', '$options');this.newWindow.opener=window;return false;\">$message</a>";
--- End code ---
mei:
This is exactly what i need. But I tried it and new chat messages still steals focus from the one i'm typing in. As before, it only happens sometimes and I can't figure out when or why.. Are there other places i need to change aswell?
Navigation
[0] Message Index
Go to full version