Asaf Army

prevent activities popups from appearing in all browser tabs instead of current one only

Discussion created by Asaf Army on Mar 14, 2016
Latest reply on May 26, 2017 by Bhavin Visariya

Hello developers,

i discovered a critical error in the sugarcrm activity popups.

 

When creating a call with a popup reminder, and opening new tabs in the browser, the popup pops up on ALL the tabs, not just the current watched tab.

This makes the popup a problem instead of a solution. because it makes the browser change tabs automatically and although pushing "cancel" in one of the tabs, all other tabs jump again with the same popup and make a big mess (especially when there are multiple popups for the same time).

 

i studied it a little. turns out that if the other tabs in the browser where opened BEFORE the call was created (in the lead activity subpanel), they don't show the popup at all. and if new tabs where created AFTER the call  was created, they all show the popup too.

 

turns out that in file include/javascript/jsAlerts.php in function addAlert(), sugarcrm adds this javascript row in the browser page :

 

addAlert("Call","Call2","Time: 14\/03\/2016 10:22","Description: <br>Status: Planned<br>Related To: Mr. roi avraham<br>Click OK to view this call or click Cancel to dismiss this message.",-24,"index.php?action=DetailView&module=Calls&record=7c0f601c-e837-19af-0c79-56e67416525e")

 

so when the function checkAlerts() in file jssource/src_files/include/javascript/sugar_3.js is called every second, the popup is shown.

 

The problem is that when opening new browser tabs after the call was created, the browser duplicates the above addAlert() row in all other tabs so the popup jumps in all browser tabs instead of the current watched one.

 

how can i make the call popup reminder to show only in the current watched tab in the browser and not all of them?

no need for an upgrade safe solution.

using CE 6.5.13

this happens in all browsers.

 

Please help.

Outcomes