Insecure Content Warning Visibility Issue with long content
Describe the bug
Description of the issue:
When a post or page contains long content and triggers an insecure content warning, the page should automatically scroll to the top and highlight the error. Currently, if a post/page with long content has insecure content, after clicking the publish/update button, the user is unable to identify the cause of the failure because the warning appears at the top of the screen, which may not be visible due to the length of the content.
https://github.com/10up/insecure-content-warning/assets/6384299/9f75d120-f36c-4f67-a059-9c35588e5ef1
Steps to Reproduce
Steps to Reproduce:
- Create or edit a post/page.
- Add a significant amount of content to the editor to make the page scrollable.
- Insert insecure content
- Click the publish/update button.
Screenshots, screen recording, code snippet
Expected Result:
The page should automatically scroll to the top and highlight the insecure content warning, making it clear to the user why the post/page is not published.
Environment information
No response
WordPress information
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Tested out the plugin on the latest WP Version [Version 6.6.1]
I can see the plugin as expected and he insecure warning is always displayed above the content, No matter how much long the post is.
Tested on Chrome, Firefox and Safari.
I have tested both the use cases,
- Publishing the post for the first time. - https://share.zight.com/6quoqNr1#discussion
- Updating an already published post. - https://share.zight.com/d5uXKy6D#discussion