From f88e18c2dee3172b398bc23f37d1e4abac22615b Mon Sep 17 00:00:00 2001 From: Ben Halpern Date: Thu, 6 Jul 2023 17:25:04 -0400 Subject: [PATCH] Fix Windows tweet schrinking phenomenon (#19686) --- app/liquid_tags/tweet_tag.rb | 2 +- app/views/liquids/_tweet.html.erb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/liquid_tags/tweet_tag.rb b/app/liquid_tags/tweet_tag.rb index 3ff6e15dd..4220d9970 100644 --- a/app/liquid_tags/tweet_tag.rb +++ b/app/liquid_tags/tweet_tag.rb @@ -16,7 +16,7 @@ class TweetTag < LiquidTagBase if (data && data['method'] === 'twttr.private.resize' && data['params'] && data['params']['0']) { iframe.style.height = data['params']['0']['height'] + 0.5 + 'px'; iframe.style.minHeight = data['params']['0']['height'] + 0.5 + 'px'; - iframe.style.width = data['params']['0']['width'] + 'px'; + iframe.style.width = data['params']['0']['width'] + 'px !important'; } break; } diff --git a/app/views/liquids/_tweet.html.erb b/app/views/liquids/_tweet.html.erb index e96add3cd..90a482d07 100644 --- a/app/views/liquids/_tweet.html.erb +++ b/app/views/liquids/_tweet.html.erb @@ -1,6 +1,7 @@ <% obj_id = "#{id}-#{rand(1_000)}" %>