Rank Math is a revolutionary WordPress SEO Plugin that combines the features of many SEO tools and lets you multiply your traffic in the easiest way possible :bulb: :chart_with_upwards_trend: →
Describe the bug
The Elementor Editor Top Bar feature isn’t detecting the changes made to Rank Math's meta box. The Update button doesn’t activate unless you make some changes to the content.
This issue was reported to Elementor by Uzair Nazeer
To Reproduce
Steps to reproduce the behavior:
Activate Elementor Top Bar Experiment
Edit a page with Elementor
Click on 'SEO' tab
Make changes in the meta box
See error - Publish button is not activated.
Expected behavior
The "Publish" button should activate.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]
Smartphone (please complete the following information):
Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]
Additional context
In your activateSaveButton() function here:
You need to run:
window.top.$e.internal( 'document/save/set-is-modified', { status: true } );
Instead of calling footerSaver.activateSaveButtons() directly.
This command document/save/set-is-modified will run footerSaver.activateSaveButtons() with a UI hook (in elementor/assets/dev/js/editor/document/save/hooks/ui/set-is-modified/after.js ), and the new Top Bar also "listens" to this command to mark the Document as "dirty".
So by using the command instead of calling activateSaveButtons() directly, it should work on the old/new editor.
Describe the bug The Elementor Editor Top Bar feature isn’t detecting the changes made to Rank Math's meta box. The Update button doesn’t activate unless you make some changes to the content.
This issue was reported to Elementor by Uzair Nazeer
To Reproduce Steps to reproduce the behavior:
Expected behavior The "Publish" button should activate.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context In your
activateSaveButton()
function here:https://github.com/rankmath/seo-by-rank-math/blob/master/includes/3rdparty/elementor/assets/src/DataCollector.js#L88
You need to run:
window.top.$e.internal( 'document/save/set-is-modified', { status: true } );
Instead of callingfooterSaver.activateSaveButtons()
directly.This command
document/save/set-is-modified
will runfooterSaver.activateSaveButtons()
with a UI hook (inelementor/assets/dev/js/editor/document/save/hooks/ui/set-is-modified/after.js
), and the new Top Bar also "listens" to this command to mark the Document as "dirty".So by using the command instead of calling
activateSaveButtons()
directly, it should work on the old/new editor.