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

Fix copy title from metadata #2518

Merged
merged 5 commits into from
Jun 7, 2024
Merged

Fix copy title from metadata #2518

merged 5 commits into from
Jun 7, 2024

Conversation

SleeplessOne1917
Copy link
Member

Fixes #2516

Alternative to #2517

@dessalines
Copy link
Member

Hrm... didn't work.

Click it the first time, it doesn't copy. Alter the URL again, then click copy, and it works the 2nd time only.

@SleeplessOne1917
Copy link
Member Author

I see the issue. It works the first time if the url field loses focus, but it doesn't work the first time when you go from the url field directly to the copy button.

Comment on lines +194 to +198
i.setState({
urlBlurTimeout: setTimeout(() => {
i.updateUrl(() => i.props.onUrlBlur?.(event.target.value));
}, 500),
});
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A kludge. It fixes the bug at least.

Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still does some reloading, but the filling works correctly now. Good enough for me, and we can fix the other things in the next release.

@dessalines dessalines merged commit c9b7f66 into main Jun 7, 2024
2 checks passed
@SleeplessOne1917 SleeplessOne1917 deleted the another-regression branch June 7, 2024 17:21
@@ -354,6 +367,10 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
},
};
}

if (this.state.form.url) {
this.fetchPageTitle();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This calls setState in the constructor. Probably only a problem for dev builds.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And should also be client side only.

@dessalines
Copy link
Member

There are still a few issues with both cross-posting, and copy title. We can fix them for the next bugfix release tho.

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

Successfully merging this pull request may close these issues.

"Copying Title" function stopped working for create post
3 participants