Emojis are now links [when delayed image loading is turned off]
-
Go on, click it.
It's not just our custom emojis. The built-in emojis are links also.
-
@anotherusername Nothing happens.
-
Correction: Emojis are now links in Firefox.
-
@anotherusername Still no repro for me. Although I'm on Waterfox, which is mostly Firefox.
-
@mott555 Although I for some reason got this popup while trying to upload that image:
-
@mott555 That's @anotherusername's signature image:
-
I'm seeing emojis in
<a>
tags in Opera
-
I'm seeing them as links in Chrome (64.version) and Mobile Chrome (63.version).
-
FF 58.0 on Linux, no repro, full refresh and all.
<img src="https://what.thedailywtf.com/plugins/nodebb-plugin-emoji/emoji/tdwtf-emoji/wtf.png" class="not-responsive emoji-tdwtf-emoji emoji--wtf" title=":wtf:" alt="undefined">
EDIT: Maybe it's just one of the nodes? How do you check that again?
-
@onyx said in Emojis are now links [in Firefox]:
EDIT: Maybe it's just one of the nodes? How do you check that again?
The X-Upstream header. For the record, mine is 172.18.0.254:4571 and I do get links.
-
@ben_lubar 172.18.0.254:4568, no links here
-
I've got 172.18.0.254:4568 with links.
-
@onyx said in Emojis are now links [in Firefox]:
@ben_lubar 172.18.0.254:4568, no links here
@hungrier said in Emojis are now links [in Firefox]:
I've got 172.18.0.254:4568 with links.
There goes that hypothesis... Grabbing packages for other browsers...
EDIT: Nothing on Chrome Version 64.0.3282.119, not sure if anything else is worth testing on here, would have to reboot for Edge...
-
Chromium v51 (TIL Chromium doesn't auto-update), logged out, gives me no links
Edit: But when I log in I get links
-
Also get the links in Microsoft Edge, but I noticed I don't get emoji with links if I'm not logged in.
Ditto in Chrome 63.numbers on Windows. Links when logged in, no links when not logged in.
-
@chaostheeternal said in Emojis are now links [in Firefox]:
Also get the links in Microsoft Edge, but I noticed I don't get emoji with links if I'm not logged in.
Ditto in Chrome 63.numbers on Windows. Links when logged in, no links when not logged in.
No difference in Chrome 64 for me
-
I don't think it's tied to browser, every one I've tested (Chrome 63 and Chrome 64, Mobile Chrome 63, Edge, Internet Explorer, and iOS 11.1.2 Safari) has emoji with links when I'm logged in.
Guess the question is, what are the default settings for "not logged in" compared to settings people who are affected have.
-
Emojis have been links for me since the Log Out When You Push the Upvote Button update - that was one of the other things that I immediately noticed.
-
same here on FF 59. I didn't even do any logging out/in business.
-
Why does it matter whether or not they're links?
-
This is probably a moot point since it sounds like it has more to do with logged in/out than it does with browser, but now I'm on mobile Chrome (63.0.something it won't let me copy and I don't feel like taking a screenshot) and they are links on this also.
When I checked on desktop Chrome, I wasn't logged in, so I guess maybe that's why they weren't on that. But it sounds like some logged in users don't get link emoji even though others do.
-
Huh, I didn't notice until reading this topic. Imma try refreshing, but at the time of posting I was x-upstream:172.18.0.254:4573 and the emojis are links....
Edit: Yes, still ja.
Chrome Desktop Version 63.0.3239.132 (Official Build) (64-bit) oh shit it's updating great I hope it doesn't crash because I don't want to lose Hangouts ffs dammit...
-
NOREPRO with x-upstream 172.18.0.254:4571 and FF 57.0.4 on win10
-
@blakeyrat said in Emojis are now links [in Firefox]:
Why does it matter whether or not they're links?
Personally, I'm just fascinated by the level of WTF that must be happening to make this possible.
-
@onyx said in Emojis are now links [in Firefox]:
@blakeyrat said in Emojis are now links [in Firefox]:
Why does it matter whether or not they're links?
Personally, I'm just fascinated by the level of WTF that must be happening to make this possible.
I know, right? Something is making links. They're real. They're not just CSS being weird and/or breaking one of the themes. There are actual
A
tags that are present in some cases, and not in others.
-
On one hand, we have
images.js
running this code:posts.find('[component="post/content"] img:not(.emoji)').each(.... /* wrap image in link */)
On the other hand, we have
style.js
running this code to add the.emoji
class to emoji-ish images:$(function() { new MutationObserver(function(records) { records.forEach(function(record) { [].forEach.call(record.addedNodes, function(node) { if (node.classList && [].some.call(node.classList, function(c) { return /^emoji-/.test(c); })) { node.classList.add('emoji'); } }); }); }).observe(document.body, {childList: true, subtree: true}); });
Which of them is ? I have no idea…
-
@dcoder Interestingly, none of the emojis in the rendered DOM actually HAVE an
emoji
class. Oh, they haveemoji-some-more-stuff
classes, but not just plainemoji
. If this is all happening in shadow DOM only, I'm guessing it might be a concurrency issue?
-
@dcoder said in Emojis are now links [in Firefox]:
On one hand, we have
images.js
running this code:posts.find('[component="post/content"] img:not(.emoji)').each(.... /* wrap image in link */)
On the other hand, we have
style.js
running this code to add the.emoji
class to emoji-ish images:$(function() { new MutationObserver(function(records) { records.forEach(function(record) { [].forEach.call(record.addedNodes, function(node) { if (node.classList && [].some.call(node.classList, function(c) { return /^emoji-/.test(c); })) { node.classList.add('emoji'); } }); }); }).observe(document.body, {childList: true, subtree: true}); });
Which of them is ? I have no idea…
Race condition? Ooh, FUN!
-
@onyx As far as I can see, the whole point of that second code snippet is to add the emoji class because the server-sent markup doesn't include it for some reason. It's part of nodebb-plugin-tdwtf-customizations added by @ben_lubar .
Concurrency/race condition was my first thought as well, but it happens too reliably for me. Maybe the sequence of events changed recently, so the emoji class adder now runs later than it used to, or the linkifier runs earlier than in the past?
Hmm, the image linkification is called from here:
if (config.delayImageLoading) { images.each(function () { $(this).attr('data-src', $(this).attr('src')); }).attr('data-state', 'unloaded').attr('src', 'about:blank'); } else { images.attr('data-state', 'loaded'); Images.wrapImagesInLinks(posts); // ⇠ $(window).trigger('action:images.loaded'); }
Guests have delayImageLoading turned on so the linkification doesn't happen immediately on page load, it happens a bit later, when images are delay-loaded. So the emoji fixer doesn't get triggered for the initial content, and those emojis get neither
.emoji
-ied nor linkified. Turning off delay loading in my profile fixes this behaviour too.
-
@dcoder repro on "Delayed image loading" thing, no idea why being logged in / logged out didn't make a difference on my end in Chrome, but yup, seems to be the reason.
@blubar!!!