Scroll function not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024 09:53 PM - edited 04-25-2024 10:03 PM
I have a widget with a button (go back button). When user clicks on this button, it should go back to the previous page and scroll down to a specific location. This is my client script:
c.goBackToOutageList = function() {
$location.path('/csm');
$timeout(function() {
$location.hash('systemMessages');
}, 600);
};
This is working in DEV instance but not in TEST instance. In the test instance, when the user clicks on the button, I can see "csm#systemMessages" getting attached to the URL. But then it reverts back to "id=csm_index". I even tried to type csm#systemMessages manually in the url and still it reverts back to csm_index.
Note: The page where it has to go back has a widget with widget ID: systemMessages. This is where it should scroll.
Any clue why this is happening and how to fix this?