Author Topic: Disable popup chat window focusing  (Read 12589 times)

0 Members and 1 Guest are viewing this topic.

bobscan

  • Full Member
  • ***
  • Posts: 10
Disable popup chat window focusing
« on: December 05, 2012, 07:18:52 PM »
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: [Select]
return "<a href=\"$href\" target=\"_blank\" " . ($title ? "title=\"$title\" " : "") . "onclick=\"if(navigator.userAgent.toLowerCase().indexOf('opera') != -1 &amp;&amp; window.event.preventDefault) window.event.preventDefault();this.newWindow = window.open($jshref, '$wndName', '$options');this.newWindow.focus();this.newWindow.opener=window;return false;\">$message</a>";

remove this bit in the line, make sure to leave only one semicolon between the remaining calls.
Code: [Select]
this.newWindow.focus();
so  it will now read:

Code: [Select]
return "<a href=\"$href\" target=\"_blank\" " . ($title ? "title=\"$title\" " : "") . "onclick=\"if(navigator.userAgent.toLowerCase().indexOf('opera') != -1 &amp;&amp; window.event.preventDefault) window.event.preventDefault();this.newWindow = window.open($jshref, '$wndName', '$options');this.newWindow.opener=window;return false;\">$message</a>";

mei

  • Jr. Member
  • **
  • Posts: 1
Re: Disable popup chat window focusing
« Reply #1 on: April 15, 2013, 03:41:28 PM »
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?