• After some very frustrating Google searches I’ve come to realize I don’t know the correct WordPress lingo to find the answer I’m looking for, so I’m going to include a screenshot of the problem.

    https://www.westveilpublishing.com/wp-content/uploads/2021/10/wpoverlappingtools.jpg

    Sometimes if I have a link in the far left third of the screen, the link editing menu thing pops up over the block editor menu and I’m unable to select the “break link” option in the block editor because I can’t cancel the overlapping link editor while keeping the hyperlink selected.

    HELP! This is really annoying. I post a lot of book tour content and we’re required to copy/paste the tour schedule. I like to convert the master list’s link to my index page (usually also already pre-set to open in a new window) to either not a link at all or a same-tab/window link to another post of my choosing.

    I realize I can change the URL and deselect open in new window, but for some reason editing a new-window link that I copy/pasted makes all these floating menu blocks migrate around the screen, which is annoying. I also realize I can delete & re-type, but that’s also annoying.

    When my link happens to fall in the right hand column of these schedule tables I can easily hit break link and re-link it manually and it’s the fastest way to make this change. I really hate that I can’t do it on the left just because these menus overlap.

    • This topic was modified 4 years, 6 months ago by Westveil Publishing.
    • This topic was modified 4 years, 6 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    Your issue is caused by the added link attribute options (ugc, sponsored, etc.). They were added by your theme or a plugin. The default link edit dialog only has the new tab option. The block toolbar that has the break link icon is positioned above relevant content and the link edit dialog is normally fully below. Unfortunately, its anchor is apparently at the bottom, so the added options caused it to grow upwards. The default dialog with only the new tab option wouldn’t normally overlap the block toolbar.

    You can account for the added options by adding some custom CSS that pushes the link dialog down until it clears the block toolbar. Properly adding custom CSS to the admin area is kind of involved. This is a bit of a cheat:

    add_action( 'admin_print_scripts-post.php', 'move_link_dialog' ); 
    function move_link_dialog() {
    	echo '<!-- Custom Editor CSS -->
            <style>.is-from-top .components-popover__content {
    		top: 10em;
    	}</style>';
    }

    This code can be added to your theme’s functions.php, but that’s not the best place for it. Ideally it would reside in a child theme or a custom plugin. You’ll likely need to adjust the 10em distance to be appropriate for your situation. This code could have adverse effects on other editor components, I’ve not tested it thoroughly. It does work on my site for at least links in paragraphs and tables.

    Making a custom plugin isn’t really all that difficult relative to other typical coding tasks. Read the Getting Started section of the plugin handbook. You can do the 5 steps via FTP or your hosting file manager. You’re unlikely to have command line access like the doc suggests. Aside from the above code, the .php plugin file only needs a simple comment header such as

    /**
     * Plugin Name: Move Link Dialog
     */

    The plugin doc suggests editing the file in situ on the server, but IMO it’s better to create the file on your local computer and simply move it to the server via FTP or file manager (instead of doing step 5).

    Thread Starter Westveil Publishing

    (@jennapeterson88)

    Thanks for the reply! Any chance you know where to look to tell my theme not to add the extra crap to the link pop-up? I never use them anyway.

    Moderator bcworkz

    (@bcworkz)

    It depends on the theme, and if you’re sure it’s due to your theme and not a plugin. Ideally there would be a user option you could deselect, but availability of such an option is probably unusual. It’ll likely take some custom coding. The usual code approach is a little strange. We let the theme go ahead and add the options in through its normal code, but then we come back and remove them before they actually get output. It’d probably be easier to hide the options with admin CSS similar to the above CSS to move the dialog down. Unfortunately I can’t suggest appropriate CSS because it is for a non-public page.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Overlapping Block Tools’ is closed to new replies.