How to Target a Button?

Author Posts

Douglas

Whenever I target a button I end up navigating away from the page. What am I doing wrong?

Thanks for your help.


Sebastian

Hey,

For regular links and buttons Microthemer should block navigation to another page when targeting mode is enabled (bottom right switch). But if some JavaScript functionality has been applied to the button, MT can’t block that.

So the solution is to select the button without actually clicking it. You can do that by hovering your mouse over the button and hitting the “Alt” key (Option key on a Mac).

You can also open up the “Inspect” pane in the footer and click on the line of HTML for the button as an alternative way to select without clicking (and triggering any click behaviour).

Cheers,
Sebastian


Sebastian

BTW, if you hold the Ctrl key when clicking on links/buttons, MT will follow them to navigate to the next page, even if targeting mode is enabled. This can be the most convenient way to move between pages when editing.


Douglas

Thank you, I’ll give those methods a try.

You must login or register to reply to this topic.