diff --git a/components/island/content.js b/components/island/content.js index e65e92b8119..0f0cc372a3b 100644 --- a/components/island/content.js +++ b/components/island/content.js @@ -51,13 +51,14 @@ export default class Content extends Component { }; calculateScrollPosition = () => scheduleScrollAction(() => { + const END_DISTANCE = 6; const {scrollableNode} = this; if (!scrollableNode) { return; } const {scrollTop, scrollHeight, offsetHeight} = scrollableNode; const scrolledToTop = scrollTop === 0; - const scrolledToBottom = offsetHeight + scrollTop >= scrollHeight; + const scrolledToBottom = offsetHeight + scrollTop >= scrollHeight - END_DISTANCE; if (scrolledToBottom) { this.props.onScrollToBottom(); diff --git a/components/user-agreement/user-agreement.examples.html b/components/user-agreement/user-agreement.examples.html index e3f6db39b10..82726431531 100644 --- a/components/user-agreement/user-agreement.examples.html +++ b/components/user-agreement/user-agreement.examples.html @@ -1,5 +1,5 @@ - +
diff --git a/components/user-agreement/user-agreement.js b/components/user-agreement/user-agreement.js index bb8cd813fce..6038f3a73ec 100644 --- a/components/user-agreement/user-agreement.js +++ b/components/user-agreement/user-agreement.js @@ -2,6 +2,7 @@ * @name User Agreement * @category Components * @framework React + * @tags Ring UI Language * @constructor * @description A component that displays a user agreement dialog. * @example-file ./user-agreement.examples.html