-
Notifications
You must be signed in to change notification settings - Fork 130
Description
Description of the problem
When you edit an entry and click the live preview button the preview loads fine, if you close the preview and try to click on the preview button again nothing happens. This is because a style attribute has been added (not sure what sets this, possibly something do with the handleDrag function) but you end up with style="pointer-events: none;" on the button.
How To Reproduce
- View an entry with live preview enabled
- Inspect the live preview button, observe that no style attribute is set
- Click on the button
- Close the live preview
- Try to click on the button with out refreshing the page
- Inspect the button and observe the style attribute added
Environment Details:
- Version: 7.5.14
- PHP Version 8.2
- MySQL Version 8
- OS: Linux
- Web Server: nginx
Possible Solution
On line 261 of https://github.com/ExpressionEngine/ExpressionEngine/blob/7.dev/themes/ee/asset/javascript/src/cp/publish/publish.js I have updated that line to remove the style attribute $('button[rel="live-preview"]').removeAttr('style').show();. But it would be better to understand what sets this in the first place and prevent it if it is not necessary.