rj487
rj487

Reputation: 4634

Rails: browser can't scroll

I use embedly card to display my content. After it call its javascript file, it will change link into a embedly card.

I have deployed into heroku https://intelligent-madame-5204.herokuapp.com/

However, after it become a embedly card, I can't use mouse to scroll down.

I put this javascript in application.js

(function(w, d){
   var id='embedly-platform', n = 'script';
   if (!d.getElementById(id)){
     w.embedly = w.embedly || function() {(w.embedly.q = w.embedly.q || []).push(arguments);};
     var e = d.createElement(n); e.id = id; e.async=1;
     e.src = ('https:' === document.location.protocol ? 'https' : 'http') + '://cdn.embedly.com/widgets/platform.js';
     var s = d.getElementsByTagName(n)[0];
     s.parentNode.insertBefore(e, s);
   }
  })(window, document);

And I put link like this way in index.html.erb

<%= link_to "Learn More",posts.content, class: "embedly-card" %>

Upvotes: 1

Views: 1428

Answers (1)

user2630808
user2630808

Reputation:

Scrollbars can be turned on and off using CSS and that seems to be the issue.

Looking at the generated CSS it seems overflow: hidden; is being set in the body selector. If you can figure out a way to change this to overflow: auto; this would solve the issue. Unfortunately I have never used embedly and can't point you as to where the body {} might be generated from.

Upvotes: 3

Related Questions