Wrh2 created this task.
Wrh2 added subscribers: Wrh2, Jdlrobson.
Wrh2 added a project: Wikidata-Page-Banner.
Herald added a subscriber: Aklapper.
Herald added a project: Wikidata.

TASK DESCRIPTION
  See the discussion at 
https://en.wikivoyage.org/wiki/Wikivoyage:Travellers%27_pub#banner_not_displaying.
 If you browse the site on Firefox, occasionally when an image is not in the 
cache the banner displays only partially.
  
  In every case where I've been able to reproduce this bug I've seen a negative 
"margin-top" style added to the image, and that appears to come from the 
positionBanner() Javascript method.  So far as I can tell, since the banner 
image width and height are not specified in the HTML, the postitionBanner() 
method should only be called once the banner image has downloaded, NOT on 
document.ready() as it currently is.  Thus, I think that changing 
ext.WikidataPageBanner.positionBanner.js to only invoke positionBanner when the 
image has loaded might fix the problem:
  
  $( "img.wpb-banner-image" ).load(function() {
        positionBanner( $wpbBannerImageContainer );
  });
  
  I'm not 100% positive that this change will fix the issue, but based on the 
fact that the Javascript currently seems to be getting width/height 
calculations wrong only in cases where the image is not cached it makes sense 
conceptually that it would fix things.

TASK DETAIL
  https://phabricator.wikimedia.org/T111710

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Wrh2
Cc: Jdlrobson, Aklapper, Wrh2, Wikidata-bugs, aude, Lydia_Pintscher



_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to