jedfoster / Readmore.js

A lightweight jQuery plugin for collapsing and expanding long blocks of text with "Read more" and "Close" links.
http://jedfoster.com/Readmore.js/
MIT License
1.5k stars 721 forks source link

readmore collapsing on mobile scroll #233

Open nicksterFL opened 5 years ago

nicksterFL commented 5 years ago

for some reason the readmore container will collapse on mobile when a user scrolls. If you click the readmore element to expand the container, then scroll on mobile, the container will collapse, while the element still says "read less".

thoughts?

jedfoster commented 5 years ago

What version of Readmore.js are you using? What mobile OS/browser?

pcross1986 commented 5 years ago

Oh yes this is an issue I am dealing with now. Ill post the link for the fix when I find it....

pcross1986 commented 5 years ago

Fix https://github.com/jedfoster/Readmore.js/pull/179/files/26d102ae022cc9f9673185f57d3a547d913d5e6e..58bad3c7e0a0f6baf2163ad96ce29c707b436bc7

jedfoster commented 5 years ago

Would it be possible for either of you, @pcross1986 or @nicksterFL, to give version 3.0 a try? https://github.com/jedfoster/Readmore.js/tree/version-3.0

pcross1986 commented 5 years ago

Just saw this... I will let you know when I use version 3

Chrisser73 commented 5 years ago

seems to be fixed in v3.0.0-1 (beta)

GuySilva commented 3 years ago

Hi, I'm having this issue both on IOS (Safari and Firefox) and Android. If I use the DevToolbar on a desktop browser, and simulate an iPhone, for instance, the issue does not present itself, but when I test it on physical devices, the issue persists. I'm using the latest Readmore version available on GIT, and have tried to implement the solution posted by pcross1986 with no practical results. Anyone managed to tackle this yet?

vezhevich commented 3 years ago

@GuySilva I ran into the same problem. I cannot solve it. My device iOS safari browser! @jedfoster help

kevinblackdesk commented 3 years ago

@GuySilva @vezhevich @nicksterFL @pcross1986 it can be fixed by adding the following css:

html,
body {
  -webkit-overflow-scrolling: touch;
}
vezhevich commented 3 years ago

@kevinblackdesk sorry, it doesn't solve the problem

kevinblackdesk commented 3 years ago

@vezhevich what about

html,
body {
  height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
xordiv commented 2 years ago

I don't know why, but touch scrolling produce 'resize' event. Now I just delete string window.addEventListener('resize', resizeBoxes); from readmore.js and it solves the problem.

vezhevich commented 2 years ago

I don't know why, but touch scrolling produce 'resize' event. Now I just delete string window.addEventListener('resize', resizeBoxes); from readmore.js and it solves the problem.

how version you use?

xordiv commented 2 years ago

I don't know why, but touch scrolling produce 'resize' event. Now I just delete string window.addEventListener('resize', resizeBoxes); from readmore.js and it solves the problem.

how version you use?

2.1.0

axiaoxin commented 2 years ago

Is there any progress? I also encountered this on iphone safari

teamaton commented 1 year ago

same problem for us - only on Android devices