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

Spaces in people-names breaks "is-typing" functionality. #11

Open
ghost opened this issue Nov 8, 2014 · 1 comment
Open

Spaces in people-names breaks "is-typing" functionality. #11

ghost opened this issue Nov 8, 2014 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 8, 2014

Just FYI, the selector breaks when a person has a name like "Some Bro", anything with a space. I didn't clone your repo or anything so I'm just posting the issue + fix here. In clien.js

socket.on("isTyping", function(data) {
if (data.isTyping) {
if ($("#"+data.person.split(' ').join('-')+"").length === 0) {
$("#updates").append("<li id='"+ data.person.split(' ').join('-') +"'> " + data.person + " is typing.");
......MY CUSTOM CALLBACK, OMITTED
}
} else {
$("#"+data.person.split(' ').join('-')+"").remove();
}
});

As you can see it's a simple matter of splitting where any spaces are and joining by a non space char. Cool app, much thanks for sharing it. :)

@tpiros
Copy link
Owner

tpiros commented Nov 8, 2014

Thanks Jesse - you can of course do a pull request and submit this fix :)

I’m swamped with all sorts of other work so I may struggle to update this

Thank you,

  • Tamas

http://me.tamas.io/

On 8 Nov 2014, at 11:01, Jesse Nicholson [email protected] wrote:

Just FYI, the selector breaks when a person has a name like "Some Bro", anything with a space. I didn't clone your repo or anything so I'm just posting the issue + fix here. In clien.js

socket.on("isTyping", function(data) {
if (data.isTyping) {
if ($("#"+data.person.split(' ').join('-')+"").length === 0) {
$("#updates").append("

" + data.person + " is typing.");
......MY CUSTOM CALLBACK, OMITTED
}
} else {
$("#"+data.person.split(' ').join('-')+"").remove();
}
});
As you can see it's a simple matter of splitting where any spaces are and joining by a non space char. Cool app, much thanks for sharing it. :)


Reply to this email directly or view it on GitHub #11.

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

No branches or pull requests

1 participant