Jump to content

@tag works bad?


OctoDev

Recommended Posts

Posted

I have rarely luck using it. When I try to tag someone it doesn't allow me to, nothing appears..

I notice it only works when you type the @ then wait a few seconds, is this something that could be done faster? lol

 

t9MsTB0.gif

 

Posted
1 hour ago, Colonel_mortis said:

What browser are you using? Some people have had problems with it in Firefox, myself included, but for me it seems to be working now, which is really weird.

Google Chrome. Did you try typing @ then wait a few seconds, then type a letter.. that seems to work for me now.

Posted
1 hour ago, Jimmy Gavekort said:

Google Chrome. Did you try typing @ then wait a few seconds, then type a letter.. that seems to work for me now.

It just works normally for me at the moment. If you open the dev console (F12 -> console tab), is anything logged when you try to tag?

Posted
3 hours ago, Jimmy Gavekort said:

Google Chrome. Did you try typing @ then wait a few seconds, then type a letter.. that seems to work for me now.

That's the same thing that I do.  And it only works about half the time, usually I also delete the prior words and try to retype everything again.  

Posted
1 minute ago, Joel R said:

usually I also delete the prior words and try to retype everything again.  

This. Often have to start over to get it to work. Maybe it can be enhanced to recognize a tag with each letter typed even if letters already exist. So if a member is BobS and it says Bob, you add the @ before and when you add the "S" it picks it up. This is very handy and should also solve the lag issue since it has to so with having to start with the first letter and there was lag so as you type nothing happens.

Posted

And it just happened to me. The following was logged to the JS console:

TypeError: a.endContainer.split is not a function

stack trace points to CKEDITOR.plugins.ipsmentions/this.respondToAtSymbol()

Firefox 47.0a2.

  • 2 months later...
Posted

A working fix for me, update plugin.js r.11 to 20

Before

this.listenForAtSymbolEvent = c.on("change", function(a) {
            CKEDITOR.tools.setTimeout(function() {
                var b = c.getSelection();
                if (b.getType() == CKEDITOR.SELECTION_TEXT)
                    for (var b = b.getRanges(!0), a = 0; a < b.length; a++)
                        b[a].collapsed && b[a].startOffset && (b[a].setStart(b[a].startContainer, 0),
                        "@" == b[a].cloneContents().$.textContent.substr(-1) && 
                        this.respondToAtSymbol(b[a]))
            }, 0, this)
        }, this)

After

this.listenForAtSymbolEvent = c.on("key", function(a) {
            CKEDITOR.tools.setTimeout(function() {
                var b = c.getSelection();
                if (b.getType() == CKEDITOR.SELECTION_TEXT)
                    for (var b = b.getRanges(!0), a = 0; a < b.length; a++)
                        b[a].collapsed && b[a].startOffset && (b[a].setStart(b[a].startContainer, 0),
                        "@" == b[a].cloneContents().$.textContent.substr(-1) && 
                        this.respondToAtSymbol(b[a]))
            }, 400, this)
        }, this)

I changed event "change" to "key" and I added a 400 ms timer to trigger the event, JS error is gone.

Posted
5 hours ago, Florent Cadet said:

A working fix for me, update plugin.js r.11 to 20

Before


this.listenForAtSymbolEvent = c.on("change", function(a) {
            CKEDITOR.tools.setTimeout(function() {
                var b = c.getSelection();
                if (b.getType() == CKEDITOR.SELECTION_TEXT)
                    for (var b = b.getRanges(!0), a = 0; a < b.length; a++)
                        b[a].collapsed && b[a].startOffset && (b[a].setStart(b[a].startContainer, 0),
                        "@" == b[a].cloneContents().$.textContent.substr(-1) && 
                        this.respondToAtSymbol(b[a]))
            }, 0, this)
        }, this)

After


this.listenForAtSymbolEvent = c.on("key", function(a) {
            CKEDITOR.tools.setTimeout(function() {
                var b = c.getSelection();
                if (b.getType() == CKEDITOR.SELECTION_TEXT)
                    for (var b = b.getRanges(!0), a = 0; a < b.length; a++)
                        b[a].collapsed && b[a].startOffset && (b[a].setStart(b[a].startContainer, 0),
                        "@" == b[a].cloneContents().$.textContent.substr(-1) && 
                        this.respondToAtSymbol(b[a]))
            }, 400, this)
        }, this)

I changed event "change" to "key" and I added a 400 ms timer to trigger the event, JS error is gone.

Key won't work on mobile devices as far as I know.

Posted

I am getting

bajdu.png

When trying to do tag someone quickly when typing here.

 

--> Official Forums (THis page literally)

 

ixvv5.gif

 

Seems to exist when you type too fast lol, well fast n fast.. I've submitted a ticket as well now.

Posted

I believe the issue is that in ipsmentions/plugin.js, respondToAtSymbol, because for some reason, under certain conditions that I haven't been able to reproduce at all (I've tried Firefox Dev Edition, Chrome Canary and Chrome release, on this site, my site, and localhost), range.endContainer is a CKEditor element rather than a text node, but only the text node has a split method.

Posted
27 minutes ago, Jimmy Gavekort said:

The issue does not occur on here anymore, i don't know if they fixed it or what. Perhaps IPS Themes issues..

I don't think it's fixed, it is just really hard to reproduce. I used to be able to get it to work every time, but I haven't had it for ages.

It does seem to vary between browsers too (because it depends whether they return an element or a text node), so it could have been a browser update.

Posted
1 hour ago, Colonel_mortis said:

I don't think it's fixed, it is just really hard to reproduce. I used to be able to get it to work every time, but I haven't had it for ages.

It does seem to vary between browsers too (because it depends whether they return an element or a text node), so it could have been a browser update.

What the.. It doesn't occur in my theme anymore too lol. 

Posted
12 minutes ago, Jimmy Gavekort said:

Found out why, you have to have a linebreak or so after trying to tag.. Or maybe a specific amount of text.

 

9cgkd.gif

 

I can reproduce this issue by quoting your post and attempting to tag next to where you tried to tag Lindy.

Edit: But only sometimes...

Posted

@Jimmy Gavekort Are you able to reproduce it if you load a fresh editor and just start typing in it? I think it only occurs under certain circumstances that I think can't happen if you just type, but can occur if you start to mention someone then change your mind, and possibly also if you do certain modifications to content you have already written (though I suspect that is browser-dependant).

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...