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

Github Comment Enhancer doesn't work when making new issues #66

Closed
ghost opened this issue Jul 28, 2015 · 8 comments
Closed

Github Comment Enhancer doesn't work when making new issues #66

ghost opened this issue Jul 28, 2015 · 8 comments

Comments

@ghost
Copy link

ghost commented Jul 28, 2015

It only works in comments.
I understand that the name is comment enhancer, but couldn't you still make it work for all text input fields on Github?

@jerone
Copy link
Owner

jerone commented Jul 28, 2015

It should work on comments, issues, pull requests, inline comments, the wiki and comments on Gist.

Can you provide in clear steps where it doesn't work for you.

@ghost
Copy link
Author

ghost commented Jul 28, 2015

It works now for some reason.

@ghost ghost closed this as completed Jul 28, 2015
@jerone
Copy link
Owner

jerone commented Jul 28, 2015

I noticed that in specific cases (particular sequence of steps) the script won't attach, but I haven't found a way to produce it yet 😞

The problem is that GitHub uses pjax for page navigation, making it very hard to attach this script. If it doesn't work, a refresh should always work.

@ghost
Copy link
Author

ghost commented Jul 28, 2015

It works for me now, not sure why it doesn't work for you.

@Tailszefox
Copy link

I've just got the same issue when trying to make a new issue. Indeed, refreshing worked. Perhaps the script should force a reload in cases like this?

@jerone
Copy link
Owner

jerone commented Aug 3, 2015

Again, I really would like to fix this issue too, but the way GitHub page navigation works (pjax) makes it really hard to detect real navigation actions.

Without clear and reproducible steps I can't fix this issue :(

@Tailszefox
Copy link

I think I caught one of the causes of the issue. It happens when navigation starts on a page where the script isn't set to run. Note that I'm using Firefox, perhaps it works differently with other browsers.

For example, if I start navigation on https://github.com/jerone/UserScripts/issues , the script gets triggered and everything works well. However, if I start navigation on https://github.com/jerone/UserScripts , or on https://github.com/jerone/UserScripts/issues?q=is%3Aissue+is%3Aclosed , the script isn't run, and thus doesn't attach to the pjax event. Hence, going anywhere from there means the script never triggers on any comment box.

One way I've found to solve this is to include the script on every page on GitHub:
// @include https://github.com/*/*

Obviously, though, that may be a tad overkill, so it can probably be tweaked. In any case, with that, the script triggers consistently and is attaching every time.

@jerone
Copy link
Owner

jerone commented Aug 3, 2015

if I start navigation on https://github.com/jerone/UserScripts , or on https://github.com/jerone/UserScripts/issues?q=is%3Aissue+is%3Aclosed , the script isn't run

Awesome, just confirmed. Will soon release a fix for this.

@jerone jerone reopened this Aug 3, 2015
@jerone jerone self-assigned this Aug 3, 2015
@jerone jerone closed this as completed in f0192bf Aug 17, 2015
@jerone jerone removed their assignment Aug 17, 2015
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