Closed Bug 1493271 Opened 6 years ago Closed 5 years ago

Clicking on "share icons" does not open new window

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P2)

63 Branch
defect

Tracking

()

RESOLVED FIXED
Webcompat Priority ?

People

(Reporter: miketaylr, Unassigned)

References

()

Details

(Whiteboard: [webcompat])

Attachments

(2 files, 1 obsolete file)

Attached file reduced.html (obsolete) —
STR:

1. go to https://blogs.microsoft.com/ai/ai-powered-captioning/
2. scroll to social footer thing, try to click on twitter or fb icon

ER: i get a new tab or window so i can create amazing social media content
AR: nothing

I've reduced the page to the following:

<!DOCTYPE html>
<title>click the bird</title>
<style>
  div {
  display: flex;
}

a {
  position: relative;
  display: inline-block;
}

a:before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0; 
}

a > img {
  opacity: 0.6; 
}

a > img:active {
  opacity: 1; 
}
</style>
<p>click the bird, pass if a new window/tab is opened</p>
<div>
  <a title="Follow on Twitter" href="https://twitter.com/intent/follow?original_referer=https%3A%2F%2Fblogs.microsoft.com%2Fai%2Fai-powered-captioning%2F&amp;screen_name=msftresearch" target="blank">
    <img src="ai_files/twitter-gray.png" alt="Twitter">
  </a>
</div>

Removing any of the CSS rules will end up with expected results.
Daniel, do you know of any bugs to dupe this against?
Flags: needinfo?(dholbert)
Whiteboard: [webcompat]
Attached file reduced.html
(updating TC to point to image on my server)
Attachment #9011107 - Attachment is obsolete: true
Do you know if this is a regression? This may very well be the same underlying issue from bug 1473108.
Flags: needinfo?(miket)
See Also: → 1473108
(In which case it's great news, because that one is significantly harder to debug)
Ah, maybe not the same, since we don't have something like a:active::before { .. }
(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)
> Do you know if this is a regression? This may very well be the same
> underlying issue from bug 1473108.

(sorry, no indication this is a regression... I only tried it as far back as 55, and it behaved the same)
Flags: needinfo?(miket)
I can reproduce this (using "reduced testcase 2" at least) in builds as far back as 2009-11-02 (version 3.7a1pre)

So, not a regression. :)
> Daniel, do you know of any bugs to dupe this against?

(I don't, offhand.)
It seems not the same issue with bug 1473108, in this case, the EventStateManage doesn't dispatch click event because it thinks the mouse down and up are not over the same element.

[1] https://searchfox.org/mozilla-central/rev/5786b9be9f887ed371c804e786081b476a403104/dom/events/EventStateManager.cpp#5001
See Also: 1473108
Component: Layout → Event Handling
Priority: -- → P2
(In reply to Edgar Chen [:edgar] from comment #10)
> the mouse down and up are not over the same element.

We get the different elements for mouse down and up in [1],
- mouse down: the image element
- mouse up: the anchor element

[1] https://searchfox.org/mozilla-central/rev/29aea2a2a3bd0f5e25ce0b60a76053fb25ba5149/dom/events/EventStateManager.cpp#4888
Component: Event Handling → User events and focus handling

Migrating Webcompat whiteboard priorities to project flags. See bug 1547409.

Webcompat Priority: --- → ?

See bug 1547409. Migrating whiteboard priority tags to program flags.

I now get expected results in both test cases, and on the site. Yay?

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: