Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When replacing an inline image, any associated link gets removed #41800

Open
rbairwell opened this issue Jun 18, 2022 · 2 comments
Open

When replacing an inline image, any associated link gets removed #41800

rbairwell opened this issue Jun 18, 2022 · 2 comments
Labels
[Block] Image Affects the Image Block [Package] Format library /packages/format-library [Type] Bug An existing feature does not function as intended

Comments

@rbairwell
Copy link

Description

When you replace an image using "Inline Image" which has been set up as a link, the link is removed when you change the image.

Step-by-step reproduction instructions

  1. Create a New Post
  2. Select an enclosing block (problem experienced with Paragraph and Table)
  3. Enter some text (to ensure it's a text field)
  4. Insert an "Inline Image" using the "More" drop down
  5. Set a link for that Inline Image by clicking on it and selecting "Link"
  6. Click on the image, select "Inline Image" using the "More drop down"
  7. Select a different image
  8. Image is no longer linked

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress: WordPress 6.0
  • Theme: Twenty Twenty-Two 1.2
  • Browser: Brave (based on Chromium) 1.39.122
  • Confirmed on Browser: Firefox 101.0.1
  • Platform: Windows 10 Profesional Desktop 64bit

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@kathrynwp
Copy link

Hi @rbairwell, thanks for submitting this issue.

I noticed the same behaviour with the regular Image block; when clicking the "Replace" option on that block to swap out another image, the link field was also erased. This makes me think that this is the intended behaviour on image-type blocks such as "inline image."

I noticed this somewhat related issue – #17119@draganescu, would you mind taking a peek at this and confirming whether or not this is the intended behaviour, or a bug?

@kathrynwp kathrynwp added [Type] Question Questions about the design or development of the editor. [Block] Image Affects the Image Block [Package] Block editor /packages/block-editor and removed [Package] Block editor /packages/block-editor labels Jul 6, 2022
@draganescu
Copy link
Contributor

I looked 😱

Screenshot 2022-07-07 at 12 24 47

A few points:

  • that link popover is totally broken when inline images are linked
  • the "replace" action via clicking on "more > inline image" again is totally not intuitive, at least for me, I've always deleted and reinserted
  • the problem in this issue is not related to the one in Image Block maintains link to previous media after replacing an image #17119 as that was about the media replace flow for blocks that use media in them, while this is a RichText problem.

The link popover being placed so wrong needs an issue (unless I am the only one experiencing the problem).

@kathrynwp kathrynwp added [Type] Bug An existing feature does not function as intended and removed [Type] Question Questions about the design or development of the editor. labels Jul 13, 2022
@ellatrix ellatrix added the [Package] Format library /packages/format-library label Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block [Package] Format library /packages/format-library [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants