Today I was working with HTML Webresource, we have some Hyperlinks on that. We have observed a
very strange issue, Save and Close button on the from is not working on first click after we click on the hyperlink in the HTML Webresource and it works when we click for second time.
Here is the sample source code that we had and if we remove the HTML webresource or if don’t click on the hyperlinks every thing is working fine. We were sure that there is something in HTML that is creating the issue.
After checking the code slowly, we found that in href properyy # was given and that was causing this issue. As the hyperlinks has # in href, when we click the link, it is pushing the current URL to browser’s history stack and due to that we must click “Save and Close” 2 times to go back to list page. Technically Save and Close button just does “Save” and do “history back”.
Removing # from href property of Anchor tag resolved the issue.
<a id="SomeLink" onclick="onSomeLinkClick()" href="" title="Some Link">Some Link</a>
Hope this helps.