I managed it by adding this conditional:
if (performance.navigation.type >= 0) {
api.previewer.previewUrl.set(api.settings.url.home + '?page_id=' + pageID);
}
This takes care of all the navigation possibilities. It’s sort of a workaround but it does the trick.
MDN Web Doc:
Related Posts:
- Fixed: Console.log twice in the edit function
- Javascript embedded disappears for editors
- Cannot run script properly with my custom plugin
- How to fetch WordPress database values in JavaScript widget
- Possible way of having multiple Gutenberg instances for a page?
- Trouble with AJAX using GET
- Woocommerce add products to cart
- Show popup on click
- Overriding inline !important CSS with Javscript code snippet with media query
- Get the link title attribute and send it google analytics as custom label via google tag manager using beehive pro for WordPress
- how i retreive the post content while editing it in real time however the editor is tinymce or gutenberg
- Calling PHP function with AJAX
- dokan edit functionality
- Add style to body based on url
- Performing CRUD operations on front end in wordpress
- How to add specific script to WordPress webpage that will working with user input and databases
- How to properly enqueue jQuery knob on WordPress without conflict?
- Ajax Call not Working in Plugin
- Javascript not getting injected into page
- Why does my custom plugin only function correctly once per page?
- How to create a custom block in Gutenberg with multiple checkboxes?
- How to get a specific string from a url
- Does anybody know how to insert a complete jquery plugin into a wordpress elementor-page?
- JS working when used normally but not in wordpress
- How can I add a custom Javascript snippet to display my feedback in footer?
- How can I create a secure file download in WordPress?
- front end editor creation for Restropress plug in – displaying information from a WP admin area, on a different URL
- Use AJAX to fetch Current Post Thumbnail for WordPress when Uploaded throughMedia Uploader Frontend
- WordPress site hamburger menu toggle not working
- Website always load twice on start
- How to add defer to WordPress Plugin javascript? [duplicate]
- Add external javascript to post template
- Problem with wordpress has_action() function
- How to get Angular app working in WordPress plugin?
- Multiple image selection custom widget
- Execute inline javascript in wordpress after page fully loaded
- Why can I not deregister my style and script on custom post type?
- Custom Field used to allow a Free Story; no longer works
- when i activate my WordPress plugin cannot see customizer options or preview
- Create a form and have custom menu display based on user answers?
- AJAX update fails for public/non-admin users
- Woocommerce – Change variations output
- WordPress appearance button
- How to disable/enable PHP plugin functionality based on a TinyMCE toggle-button
- Javascript inserted from Plugin pointing to wrong location
- How to solve Blocked a frame with origin from accessing a cross origin frame error in wordpress?
- WordPress ajax error 400 bad request for sending data to remote site [duplicate]
- WordPress panel is not loading after plugin activated with error: HTTP ERROR 500
- Enabling plugin on specific pages and subpages
- Speeding up WordPress on a Local Network
- how to add navigation icons in specific template?
- How to use information from the database in the front-end?
- Conditional Fields depending on checkboxes
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Caching of combined CSS and JS fails because of losing MIME types through combining by PHP
- How to pass value from WordPress to Javascript
- how to send two forms with one click (script ninjaforms id)
- How to create a custom control in customizer
- wp_enqueue_scrpts seems not to get called
- How to print shortcode with js in visual composer?
- Number format in thousands on highcharts in wpdatatable plugin
- Link in navigation menu send user to different page if mobile?
- Facebook Quote Plugin for Blockquote?
- Disqus comments count taking long to update
- Adding javascript to header of MetroMagazine theme
- How to add separator between default and custom panels in WordPress customizer?
- Embed Javascript code to registered users only
- show-hide based on select option jquery wordpress
- Speed issues because of CSS & JavaScript
- Having trouble going from Jfiddle to implementing in WordPress :(
- Javascript in plugin not working
- How to limit each front-end user to view just his own uploaded files on Amazon S3?
- How to create a dashboard for logged-in users with custom functionality? [closed]
- Best use adding user generated JS/CSS to a theme with a plugin
- Creating a user ‘add custom field’ section
- Javascript not working
- Jetpack Comments Change Placeholder Text
- Creating custom URL for async content
- Media Playlist Plugin
- How to copy data from user profile page (profile.php) to theme customizer
- Need to hide an element depending on date and post category
- Adding an onchange event to a custom dropdown menu in WordPress
- How to set up php,javascript and css to allow for our finished product to be displayed within a page?
- How do I convince this button to do something when it is clicked?
- Possible jquery / library conflict in plugin usage
- Ajax, jQuery and WordPress
- disable lightbox in a plugin [closed]
- Plugin and javascript placement
- Why won’t the Comprehensive Google Map Plugin load?
- Plugin – including external javascript calling google maps
- get_option include in my adsense
- contact 7 plugin stops some pages from working properly
- Expanding / Collapsing Modules in WordPress Panel
- Can’t insert files in other inputs
- Is it possible to run javascript on plugin deactivated?
- How do I output user_registered time in my correct timezone?
- Ajax in Plugins: returns the whole page
- Move specific javascript to the footer
- Element works, but not on wordpress site [duplicate]
- Load css classes after using ajax calls