webcompat / web-bugs

A place to report bugs on websites.
https://webcompat.com
Mozilla Public License 2.0
747 stars 67 forks source link

www.magicleap.com - site is not usable #14354

Closed webcompat-bot closed 6 years ago

webcompat-bot commented 6 years ago

URL: https://www.magicleap.com/

Browser / Version: Firefox 59.0 Operating System: Mac OS X 10.13 Tested Another Browser: Unknown

Problem type: Site is not usable Description: The menu under "Platform Features" is not working. JS errors int he console. Steps to Reproduce:

layout.css.servo.enabled: true Screenshot Description

From webcompat.com with ❤️

miketaylr commented 6 years ago

I can reproduce this in the latest 59 Nightly. But also in 58.

When I click on a menu item/link like "Visual Perception", I see an error in the console:

TypeError: a is null[Learn More]
index.js:3:147405
module.exports<[882]/H</t.prototype.goToSlide
https://www.magicleap.com/_next/e4caf721-f917-40e8-84f1-71704ffe2e9a/page/index.js:3:147405
onClick
https://www.magicleap.com/_next/e4caf721-f917-40e8-84f1-71704ffe2e9a/page/index.js:3:148950
s
https://www.magicleap.com/_next/23e8f9681d9680314fd9935129ac4b41/app.js:3:289264
invokeGuardedCallback
https://www.magicleap.com/_next/23e8f9681d9680314fd9935129ac4b41/app.js:3:352032
invokeGuardedCallbackAndCatchFirstError
https://www.magicleap.com/_next/23e8f9681d9680314fd9935129ac4b41/app.js:3:352126
p
https://www.magicleap.com/_next/23e8f9681d9680314fd9935129ac4b41/app.js:3:290074
y
https://www.magicleap.com/_next/23e8f9681d9680314fd9935129ac4b41/app.js:3:290545
g
https://www.magicleap.com/_next/23e8f9681d9680314fd9935129ac4b41/app.js:3:290702
forEach self-hosted:271:13 m
https://www.magicleap.com/_next/23e8f9681d9680314fd9935129ac4b41/app.js:3:290344
x
https://www.magicleap.com/_next/23e8f9681d9680314fd9935129ac4b41/app.js:3:291377
Ar
https://www.magicleap.com/_next/23e8f9681d9680314fd9935129ac4b41/app.js:3:366962
xe
https://www.magicleap.com/_next/23e8f9681d9680314fd9935129ac4b41/app.js:3:298316
batchedUpdates
https://www.magicleap.com/_next/23e8f9681d9680314fd9935129ac4b41/app.js:3:333750
$
https://www.magicleap.com/_next/23e8f9681d9680314fd9935129ac4b41/app.js:3:294870
Oe
https://www.magicleap.com/_next/23e8f9681d9680314fd9935129ac4b41/app.js:3:298764
Oe self-hosted:992:17
miketaylr commented 6 years ago

https://www.magicleap.com/_next/e4caf721-f917-40e8-84f1-71704ffe2e9a/page/index.js:formatted

Here's a from the goToSlide method:

t.prototype.goToSlide = function(e, t) {
    var n = e;
    if (t && (t.preventDefault(), t.stopPropagation(), this.state.currentSlide !== e)) {
        var a = t.target.parentNode.getAttribute('aria-label');
        (0, M.sendAnalyticsEvent)({
            event: 'homepage-platform-features-click',
            gaEventCategory: 'homepage-platform-features',
            gaEventAction: 'click-' + a.replace(/\s+/g, '-').toLowerCase()
        })
    }
    n < 0 ? n = 5 : n >= 6 && (n = 0),
        this.setState({
            currentSlide: n
        })
}

var a = t.target.parentNode.getAttribute('aria-label');

miketaylr commented 6 years ago
<li class="NavDot__NavDotWrapper-s19wp0v8-0 ioULZz">
  <button class="NavDot__NavDotButton-s19wp0v8-1 SzOew" aria-label="Visual Perception">
    <div class="NavDot__Dot-s19wp0v8-2 gHepfp"></div>
    <div class="NavDot__NavDotLabel-s19wp0v8-3 cPBdhc">Visual Perception</div>
  </button>
</li>
miketaylr commented 6 years ago

So in Chrome, t.target is an HTMLDivElement, but in Firefox it's an HTMLButtonElement.... which explains why getAttribute isn't returning what the developers expect. It's not there.

It feels like this is a known issue...maybe? @wisniewskit @denschub @karlcow, anything come to mind?

miketaylr commented 6 years ago

(I suppose this is just another variation of the non-interactive child content for <button>... presumably click handlers on a <div> makes it pretty interactive.)

miketaylr commented 6 years ago

Possibly a duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=1089326

miketaylr commented 6 years ago

Even with that being the case, I think we should move this to needscontact -- it's pretty simple to work around this in a cross-browser way, either by setting the click handler on the button itself (and reading area-label from that), or just reading the textContent property of the <button> to get to the value.

adamopenweb commented 6 years ago

I think this is fixed now, menu works for me in Firefox 58 & 60 for OSX.

Closing, please reopen if you can still reproduce.