web-bugs icon indicating copy to clipboard operation
web-bugs copied to clipboard

m.accuweather.com - see bug description

Open gvanwaelvelde opened this issue 9 years ago • 9 comments

URL: https://m.accuweather.com/en/us/mountain-view-ca/94041/weather-forecast/337169

Browser / Version: Firefox Mobile 56.0 Operating System: Android 6.0.1 Tested Another Browser: Yes

Problem type: Something else Description: Cannot close the notice at the top of the page. Steps to Reproduce:

  1. Go to https://m.accuweather.com/en/us/mountain-view-ca/94041/weather-forecast/337169
  2. At the top of the page, there is a message recommending to download the AccuWeather app. Click the x at the left to close the message.
  3. Nothing happens, the message doesn't disappear.

In Google Chrome the message disappears as expected.

From webcompat.com with ❤️

gvanwaelvelde avatar Aug 03 '17 17:08 gvanwaelvelde

Thanks for the report @gvanwaelvelde. I can reproduce this in Firefox 57 for Android.

screen shot 2017-08-03 at 5 00 13 pm

adamopenweb avatar Aug 03 '17 21:08 adamopenweb

We can reproduce this error in Firefox desktop by spoofing the user agent. In the console we get an error using Click or Touch (doesn't matter):

ReferenceError: event is not defined[Learn More]  smartbanner.min.js:5:8961
SyntaxError: expected expression, got ')'[Learn More]  void();:1:5

adamopenweb avatar Aug 03 '17 21:08 adamopenweb

It's indeed yet another case of window.event:

ReferenceError: event is not defined      smartbanner.min.js:5:8961
	addEventListeners/< https://vortex.accuweather.com/adc2010/m/js/banner/smartbanner.min.js:5:8961
	nrWrapper https://m.accuweather.com/en/us/mountain-view-ca/94041/weather-forecast/337169:621:11552
	fireMouseEvent resource://devtools/shared/touch/simulator-core.js:225:5
	dispatchMouseEvents resource://devtools/shared/touch/simulator-core.js:202:13

They just have to change that function in smartbanner.js:

function addEventListeners(self) {
  var closeIcon = document.querySelector('.js_smartbanner__exit');
  closeIcon.addEventListener('click', function () {
    return handleExitClick(event, self);
  });
  if (_detector2.default.jQueryMobilePage()) {
    $(document).on('pagebeforeshow', self, handleJQueryMobilePageLoad);
  }
}

If they simply pass in the event parameter on this line like so, and it should be fine:

  closeIcon.addEventListener('click', function (event) {

wisniewskit avatar Aug 04 '17 17:08 wisniewskit

I wonder if @johnmgrant can help us find the right person at @AccuWeather to fix this issue as explained by @wisniewskit

karlcow avatar Aug 08 '17 07:08 karlcow

Just an FYI, I went ahead and forwarded this to our web team.

johnmgrant avatar Aug 08 '17 14:08 johnmgrant

Thanks a lot!

karlcow avatar Aug 08 '17 23:08 karlcow

The issue is still reproducible.

Tested on: Firefox Mobile Nightly 58.0a1 (2017-11-05) Samsung Galaxy S7 (Android 7.0) - 1440 x 2560 pixels (~534 ppi pixel density)

This should be fixed now (I don't get a banner, but if it come back, we support window.event.

miketaylr avatar Jul 06 '18 16:07 miketaylr

I don't get a banner

For the record: image