Client script execution is different on Service Portal after using browser back button from sc_category page.

Steps to Reproduce


This is working fine in Jakarta.
It is reproducible in Kingston and London.

1. Login to K or L instance.
2. Create an onLoad client script on catalog item "Access"
--> Mark the UI type as "All"
--> Script: alert("this is a test");
3. Navigate to Service Portal
4. Order Something > Browser by Categories
5. Click on Software
--> You will land on Software categories page (sp?id=sc_category&sys_id=2809952237b1300054b6a3549dbe5dd4)
6. Click on Access
--> Notice the alert will pop-up AFTER you land on sc_cat_item page.
7. Now press "OK" and click the browser back button.
8. Without changing anything, click on Access again.
--> Notice how the pop-up displays even before navigating to the sc_cat_item page (Please check attached screenshot).
--> Looks like the alert shows up as soon as the URL changes.

The behavior is different in Jakarta where the pop-up does not show up until you navigate to sc_cat_item page no matter how many times you navigate back and forth.
On the platform side, the behavior is same as in Jakarta through London.

Actual behavior:
Client script is running before you navigating to sc_cat_item page if browser back button is used. It only works fine the first time.

Expected behavior:
Client script should run after you navigate to sc_cat_item page.


This issue is fixed in Madrid.

Related Problem: PRB1324986

Seen In

There is no data to report.

Fixed In


Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-06-25 16:21:43