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

Fixed adding dependencies for editing by reference to the change #21432

Open
3 of 5 tasks
Zilero232 opened this issue Jun 7, 2024 · 3 comments
Open
3 of 5 tasks

Fixed adding dependencies for editing by reference to the change #21432

Zilero232 opened this issue Jun 7, 2024 · 3 comments

Comments

@Zilero232
Copy link

Zilero232 commented Jun 7, 2024

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened.

When we use the edit-link from the plugin, there is a problem that when we focus on another edit-link, we keep the state of the previous one and the state of the current one does not match reality

How can we reproduce this behavior?

  1. Select several parts of the text and create an edit link
  2. Open any edit-link and change something
  3. Then change the focus to another edit-link

The state of the previous one will be saved to the current one, after which there will continue to be a constant copying of states when focusing on other links from edit-link

As a quick fix i used following snippet.
onChangeLink = () => { ... } ( [ linkValue ] ); // Add dependencies

Technical info

  • WordPress version:
  • Yoast SEO version:
  • If relevant, which editor is affected (or editors):
  • Classic Editor
  • Gutenberg
  • Classic Editor plugin
@josevarghese
Copy link
Contributor

Hi @Zilero232

Thanks for using the Yoast SEO plugin and for creating the issue.

Can you share more details about the issue you are noticing with a screenshot or video using Loom or other tools you prefer to help us better understand the issue you are facing?

We look forward to hearing from you and are happy to help you.

@Zilero232
Copy link
Author

Zilero232 commented Jun 11, 2024

@josevarghese Hello, if we create two links and open a modal window to change the settings of these links, and if we click on the second link when the cursor is on the first link and try to change the settings, then the first link will be changed instead of the second link and the cursor, as we see after clicking on SAVE, the settings of the first link will be changed

Video:
https://github.com/Yoast/wordpress-seo/assets/68345676/2f6c39e5-5879-4d43-a83a-9d5da12c1da1

Need add dependencies for function onChangeLink = () => { ... } ( [ linkValue ] ); // Add dependencies

@josevarghese
Copy link
Contributor

Hi @Zilero232

Thanks for the video. A hyperlink should be added for words or sentences. However, within your video, I noticed that the two links were added for a single word without any space in between them to differentiate them. I tried to link the words in a sentence on my lab site for two words and noticed that link settings are saved without any issues. See the screencast over here for your reference: https://www.loom.com/share/45e36684e3554325a91f45696e76e3a3.

So, can you please try adding a space between the words to make them separate words and then adding the links for each word?

We look forward to hearing from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants