Bug 303471 - Emoticons are changed to text but are not changed back
Summary: Emoticons are changed to text but are not changed back
Status: RESOLVED NOT A BUG
Alias: None
Product: telepathy
Classification: Unmaintained
Component: text-ui (show other bugs)
Version: git-latest
Platform: unspecified Linux
: NOR minor
Target Milestone: Future
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-13 14:04 UTC by Daniele E. Domenichelli
Modified: 2013-01-17 08:38 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniele E. Domenichelli 2012-07-13 14:04:01 UTC
When you click an emoticon, the it is changed to the corresponding text, but if you click that text again it is changed to a blue [?]
Comment 1 Martin Klapetek 2012-07-13 14:06:42 UTC
Works here (latest master, of course). Can anyone else confirm?
Comment 2 David Edmundson 2012-07-15 21:41:57 UTC
Works for me too..

DrDanz please use the webkit inspect option and see if there's any errors in the console.

Also tell us which theme you're using and which emoticon set. I suspect you're using one with it's own Template.html.
Comment 3 Daniele E. Domenichelli 2012-09-24 09:09:10 UTC
This seems to be broken again in master... icons are no longer changed to text
Marking this as blocking for 0.5.1
Comment 4 David Edmundson 2012-09-24 09:55:00 UTC
It works for me. Must be theme related, at which point this is quite a minor issue.  We can't fix everything if themes ship a broken Template.html file

Could you open the web inspector from the context menu and show us what's in the console?

(also in this context, I don't care about master, only the 0.5 branch)
Comment 5 Daniele E. Domenichelli 2012-09-24 10:25:24 UTC
Ok, I confirm that it is a theme related issue...
Except for Renkoo and SimKete and a limited set of themes, most of the themes I tried either don't swap, or swap correctly to text, but don't swap back to the image (and a question mark image is showed instead)
Comment 6 Daniele E. Domenichelli 2012-09-24 10:34:14 UTC
Actually after trying a few more the set is not that limited...

For themes that don't switch back to the original image, the console gives this kind of error:

Failed to load resource: Error opening //home/drdanz/.kde/share/apps/ktelepathy/styles/Ruler.AdiumMessageStyle/Contents/Resources/undefined: No such file or directory

Failed to load resource: Error opening //home/drdanz/.kde/share/apps/ktelepathy/styles/Mochastyle.AdiumMessageStyle/Contents/Resources/undefined: No such file or directory


For themes that don't switch to the original text there is no error at all.
Comment 7 David Edmundson 2012-09-24 22:31:33 UTC
This is now back to being a non-important bug as it does not affect the defaults we ship.

It is also not a regression. 
I see no reason for this to block any release.
Comment 8 Daniele E. Domenichelli 2012-09-25 09:43:40 UTC
I agree that since it's a theme problem it's not 

Anyway I investigated a little and I found out that the theme that I was using (that is not changing at all) in Footer.html has this:

                //Swap an image with its alt-tag text on click, or expand/unexpand an attached image
                document.onclick = imageCheck;
                function imageCheck() {         
                        node = event.target;
                        if(node.tagName == 'IMG' && !client.zoomImage(node) && node.alt) {
                                a = document.createElement('a');
                                a.setAttribute('onclick', 'imageSwap(this)');
                                a.setAttribute('src', node.getAttribute('src'));
                                a.className = node.className;
                                text = document.createTextNode(node.alt);
                                a.appendChild(text);
                                node.parentNode.replaceChild(a, node);
                        }
                }

                function imageSwap(node) {
                        shouldScroll = nearBottom();

                        //Swap the image/text
                        img = document.createElement('img');
                        img.setAttribute('src', node.getAttribute('src'));
                        img.setAttribute('alt', node.firstChild.nodeValue);
                        img.className = node.className;
                        node.parentNode.replaceChild(img, node);

                        alignChat(shouldScroll);
                }

After deleting this part the emoticons switch correctly.

Should we close this as invalid, since it is a theme problem, or do we want to handle this and find a solution?
Comment 9 David Edmundson 2013-01-17 08:38:01 UTC
> Should we close this as invalid, since it is a theme problem, 

I think so.