CJY0208 / react-router-cache-route

Route with cache for react-router V5 like <keep-alive /> in Vue
https://www.npmjs.com/package/react-router-cache-route
MIT License
1.15k stars 111 forks source link

cordova的ios容器中isScrollableNode判断有兼容问题 #78

Open hoyt-tian opened 4 years ago

hoyt-tian commented 4 years ago

在cordova9.0的ios容器中, node.scrollWidth与node.clientWidth以及node.scrollHeight与node.clientHeight始终相等, 导致saveScrollPosition时找不到需要save的元素. 是否可以直接改成下面的形式? `function isScrollableNode(node = {}) { if (!isExist(node)) { return false }

return node.scrollTop > 0 || node.scrollLeft > 0 }`

CJY0208 commented 4 years ago

这是一个可行的做法,但在 scrollTop 或 scrollLeft 等于 0 时也会出现判断偏差,这样的情况下有没有办法兼容呢?