payload: {"action":"created","comment":{"url":"https://api.github.com/repos/wireapp/wire-webapp/pulls/comments/261198900","pull_request_review_id":209073366,"id":261198900,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI2MTE5ODkwMA==","diff_hunk":"@@ -76,6 +79,66 @@ ko.bindingHandlers.showAllTimestamps = {\n   },\n };\n \n+ko.bindingHandlers.infinite_scroll = {\n+  init(scrollingElement, params) {\n+    const {onHitTop, onHitBottom} = params();\n+\n+    let scrollListenerEnabled = false;\n+    const disableScrollListener = debounce(() => (scrollListenerEnabled = false), 500);\n+    const temporarlyEnableScrollListener = () => {\n+      scrollListenerEnabled = true;\n+      disableScrollListener();\n+    };\n+\n+    const onScroll = event => {\n+      if (!scrollListenerEnabled) {\n+        return;\n+      }\n+      const element = event.target;\n+\n+      // On some HDPI screen scrollTop returns a floating point number instead of an integer\n+      // https://github.com/jquery/api.jquery.com/issues/608\n+      const scrollPosition = Math.ceil(element.scrollTop);\n+      const scrollEnd = element.offsetHeight + scrollPosition;\n+      const hitTop = scrollPosition <= 0;\n+      const hitBottom = scrollEnd >= element.scrollHeight;\n+\n+      if (hitTop) {\n+        onHitTop();\n+      } else if (hitBottom) {\n+        onHitBottom();\n+      }\n+    };\n+\n+    const onMouseWheel = event => {\n+      /**\n+       * To avoid reacting to programmatically triggered scroll, we just want to enable the scroll listener when there is a mouse event before it.\n+       * The strategy here is to enable the scroll listener when there is a mouse event and automatically disable the listener after 500ms of inactivity of the mouse.\n+       */","path":"src/script/view_model/bindings/MessageListBindings.js","position":51,"original_position":51,"commit_id":"abfcc9f3cb8b511435386b88269beab536e3b373","original_commit_id":"abfcc9f3cb8b511435386b88269beab536e3b373","user":{"login":"AndyLnd","id":1122618,"node_id":"MDQ6VXNlcjExMjI2MTg=","avatar_url":"https://avatars0.githubusercontent.com/u/1122618?v=4","gravatar_id":"","url":"https://api.github.com/users/AndyLnd","html_url":"https://github.com/AndyLnd","followers_url":"https://api.github.com/users/AndyLnd/followers","following_url":"https://api.github.com/users/AndyLnd/following{/other_user}","gists_url":"https://api.github.com/users/AndyLnd/gists{/gist_id}","starred_url":"https://api.github.com/users/AndyLnd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndyLnd/subscriptions","organizations_url":"https://api.github.com/users/AndyLnd/orgs","repos_url":"https://api.github.com/users/AndyLnd/repos","events_url":"https://api.github.com/users/AndyLnd/events{/privacy}","received_events_url":"https://api.github.com/users/AndyLnd/received_events","type":"User","site_admin":false},"body":"I think it might be problematic to only react to the `mousewheel` event. There are other user interactions that will cause scrolling, selecting chunks of text and dragging the scrollbar for example.","created_at":"2019-02-28T13:41:04Z","updated_at":"2019-02-28T13:45:50Z","html_url":"https://github.com/wireapp/wire-webapp/pull/5922#discussion_r261198900","pull_request_url":"https://api.github.com/repos/wireapp/wire-webapp/pulls/5922","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/wireapp/wire-webapp/pulls/comments/261198900"},"html":{"href":"https://github.com/wireapp/wire-webapp/pull/5922#discussion_r261198900"},"pull_request":{"href":"https://api.github.com/repos/wireapp/wire-webapp/pulls/5922"}}},"pull_request":{"url":"https://api.github.com/repos/wireapp/wire-webapp/pulls/5922","id":256344620,"node_id":"MDExOlB1bGxSZXF1ZXN0MjU2MzQ0NjIw","html_url":"https://github.com/wireapp/wire-webapp/pull/5922","diff_url":"https://github.com/wireapp/wire-webapp/pull/5922.diff","patch_url":"https://github.com/wireapp/wire-webapp/pull/5922.patch","issue_url":"https://api.github.com/repos/wireapp/wire-webapp/issues/5922","number":5922,"state":"open","locked":false,"title":"fix: Add a proper binding to handle infinite scroll (WEBAPP-5949)","user":{"login":"atomrc","id":1090716,"node_id":"MDQ6VXNlcjEwOTA3MTY=","avatar_url":"https://avatars3.githubusercontent.com/u/1090716?v=4","gravatar_id":"","url":"https://api.github.com/users/atomrc","html_url":"https://github.com/atomrc","followers_url":"https://api.github.com/users/atomrc/followers","following_url":"https://api.github.com/users/atomrc/following{/other_user}","gists_url":"https://api.github.com/users/atomrc/gists{/gist_id}","starred_url":"https://api.github.com/users/atomrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atomrc/subscriptions","organizations_url":"https://api.github.com/users/atomrc/orgs","repos_url":"https://api.github.com/users/atomrc/repos","events_url":"https://api.github.com/users/atomrc/events{/privacy}","received_events_url":"https://api.github.com/users/atomrc/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-02-26T16:04:01Z","updated_at":"2019-02-28T13:45:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3dec00006311d5589d9eda4bdcd49016538d21ae","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wireapp/wire-webapp/pulls/5922/commits","review_comments_url":"https://api.github.com/repos/wireapp/wire-webapp/pulls/5922/comments","review_comment_url":"https://api.github.com/repos/wireapp/wire-webapp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wireapp/wire-webapp/issues/5922/comments","statuses_url":"https://api.github.com/repos/wireapp/wire-webapp/statuses/abfcc9f3cb8b511435386b88269beab536e3b373","head":{"label":"wireapp:fix/search_scrolling_behavior","ref":"fix/search_scrolling_behavior","sha":"abfcc9f3cb8b511435386b88269beab536e3b373","user":{"login":"wireapp","id":16047324,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDQ3MzI0","avatar_url":"https://avatars3.githubusercontent.com/u/16047324?v=4","gravatar_id":"","url":"https://api.github.com/users/wireapp","html_url":"https://github.com/wireapp","followers_url":"https://api.github.com/users/wireapp/followers","following_url":"https://api.github.com/users/wireapp/following{/other_user}","gists_url":"https://api.github.com/users/wireapp/gists{/gist_id}","starred_url":"https://api.github.com/users/wireapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wireapp/subscriptions","organizations_url":"https://api.github.com/users/wireapp/orgs","repos_url":"https://api.github.com/users/wireapp/repos","events_url":"https://api.github.com/users/wireapp/events{/privacy}","received_events_url":"https://api.github.com/users/wireapp/received_events","type":"Organization","site_admin":false},"repo":{"id":63881328,"node_id":"MDEwOlJlcG9zaXRvcnk2Mzg4MTMyOA==","name":"wire-webapp","full_name":"wireapp/wire-webapp","private":false,"owner":{"login":"wireapp","id":16047324,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDQ3MzI0","avatar_url":"https://avatars3.githubusercontent.com/u/16047324?v=4","gravatar_id":"","url":"https://api.github.com/users/wireapp","html_url":"https://github.com/wireapp","followers_url":"https://api.github.com/users/wireapp/followers","following_url":"https://api.github.com/users/wireapp/following{/other_user}","gists_url":"https://api.github.com/users/wireapp/gists{/gist_id}","starred_url":"https://api.github.com/users/wireapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wireapp/subscriptions","organizations_url":"https://api.github.com/users/wireapp/orgs","repos_url":"https://api.github.com/users/wireapp/repos","events_url":"https://api.github.com/users/wireapp/events{/privacy}","received_events_url":"https://api.github.com/users/wireapp/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wireapp/wire-webapp","description":"👽 Wire for web","fork":false,"url":"https://api.github.com/repos/wireapp/wire-webapp","forks_url":"https://api.github.com/repos/wireapp/wire-webapp/forks","keys_url":"https://api.github.com/repos/wireapp/wire-webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wireapp/wire-webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wireapp/wire-webapp/teams","hooks_url":"https://api.github.com/repos/wireapp/wire-webapp/hooks","issue_events_url":"https://api.github.com/repos/wireapp/wire-webapp/issues/events{/number}","events_url":"https://api.github.com/repos/wireapp/wire-webapp/events","assignees_url":"https://api.github.com/repos/wireapp/wire-webapp/assignees{/user}","branches_url":"https://api.github.com/repos/wireapp/wire-webapp/branches{/branch}","tags_url":"https://api.github.com/repos/wireapp/wire-webapp/tags","blobs_url":"https://api.github.com/repos/wireapp/wire-webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wireapp/wire-webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wireapp/wire-webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/wireapp/wire-webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wireapp/wire-webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/wireapp/wire-webapp/languages","stargazers_url":"https://api.github.com/repos/wireapp/wire-webapp/stargazers","contributors_url":"https://api.github.com/repos/wireapp/wire-webapp/contributors","subscribers_url":"https://api.github.com/repos/wireapp/wire-webapp/subscribers","subscription_url":"https://api.github.com/repos/wireapp/wire-webapp/subscription","commits_url":"https://api.github.com/repos/wireapp/wire-webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/wireapp/wire-webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/wireapp/wire-webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/wireapp/wire-webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/wireapp/wire-webapp/contents/{+path}","compare_url":"https://api.github.com/repos/wireapp/wire-webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wireapp/wire-webapp/merges","archive_url":"https://api.github.com/repos/wireapp/wire-webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wireapp/wire-webapp/downloads","issues_url":"https://api.github.com/repos/wireapp/wire-webapp/issues{/number}","pulls_url":"https://api.github.com/repos/wireapp/wire-webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/wireapp/wire-webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/wireapp/wire-webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wireapp/wire-webapp/labels{/name}","releases_url":"https://api.github.com/repos/wireapp/wire-webapp/releases{/id}","deployments_url":"https://api.github.com/repos/wireapp/wire-webapp/deployments","created_at":"2016-07-21T15:34:05Z","updated_at":"2019-02-28T13:22:50Z","pushed_at":"2019-02-28T13:22:50Z","git_url":"git://github.com/wireapp/wire-webapp.git","ssh_url":"git@github.com:wireapp/wire-webapp.git","clone_url":"https://github.com/wireapp/wire-webapp.git","svn_url":"https://github.com/wireapp/wire-webapp","homepage":"https://app.wire.com","size":36346,"stargazers_count":845,"watchers_count":845,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":187,"mirror_url":null,"archived":false,"open_issues_count":48,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":187,"open_issues":48,"watchers":845,"default_branch":"dev"}},"base":{"label":"wireapp:dev","ref":"dev","sha":"4bfaea2a212c40757f5648b8ccc4636cb33735da","user":{"login":"wireapp","id":16047324,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDQ3MzI0","avatar_url":"https://avatars3.githubusercontent.com/u/16047324?v=4","gravatar_id":"","url":"https://api.github.com/users/wireapp","html_url":"https://github.com/wireapp","followers_url":"https://api.github.com/users/wireapp/followers","following_url":"https://api.github.com/users/wireapp/following{/other_user}","gists_url":"https://api.github.com/users/wireapp/gists{/gist_id}","starred_url":"https://api.github.com/users/wireapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wireapp/subscriptions","organizations_url":"https://api.github.com/users/wireapp/orgs","repos_url":"https://api.github.com/users/wireapp/repos","events_url":"https://api.github.com/users/wireapp/events{/privacy}","received_events_url":"https://api.github.com/users/wireapp/received_events","type":"Organization","site_admin":false},"repo":{"id":63881328,"node_id":"MDEwOlJlcG9zaXRvcnk2Mzg4MTMyOA==","name":"wire-webapp","full_name":"wireapp/wire-webapp","private":false,"owner":{"login":"wireapp","id":16047324,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDQ3MzI0","avatar_url":"https://avatars3.githubusercontent.com/u/16047324?v=4","gravatar_id":"","url":"https://api.github.com/users/wireapp","html_url":"https://github.com/wireapp","followers_url":"https://api.github.com/users/wireapp/followers","following_url":"https://api.github.com/users/wireapp/following{/other_user}","gists_url":"https://api.github.com/users/wireapp/gists{/gist_id}","starred_url":"https://api.github.com/users/wireapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wireapp/subscriptions","organizations_url":"https://api.github.com/users/wireapp/orgs","repos_url":"https://api.github.com/users/wireapp/repos","events_url":"https://api.github.com/users/wireapp/events{/privacy}","received_events_url":"https://api.github.com/users/wireapp/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wireapp/wire-webapp","description":"👽 Wire for web","fork":false,"url":"https://api.github.com/repos/wireapp/wire-webapp","forks_url":"https://api.github.com/repos/wireapp/wire-webapp/forks","keys_url":"https://api.github.com/repos/wireapp/wire-webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wireapp/wire-webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wireapp/wire-webapp/teams","hooks_url":"https://api.github.com/repos/wireapp/wire-webapp/hooks","issue_events_url":"https://api.github.com/repos/wireapp/wire-webapp/issues/events{/number}","events_url":"https://api.github.com/repos/wireapp/wire-webapp/events","assignees_url":"https://api.github.com/repos/wireapp/wire-webapp/assignees{/user}","branches_url":"https://api.github.com/repos/wireapp/wire-webapp/branches{/branch}","tags_url":"https://api.github.com/repos/wireapp/wire-webapp/tags","blobs_url":"https://api.github.com/repos/wireapp/wire-webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wireapp/wire-webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wireapp/wire-webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/wireapp/wire-webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wireapp/wire-webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/wireapp/wire-webapp/languages","stargazers_url":"https://api.github.com/repos/wireapp/wire-webapp/stargazers","contributors_url":"https://api.github.com/repos/wireapp/wire-webapp/contributors","subscribers_url":"https://api.github.com/repos/wireapp/wire-webapp/subscribers","subscription_url":"https://api.github.com/repos/wireapp/wire-webapp/subscription","commits_url":"https://api.github.com/repos/wireapp/wire-webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/wireapp/wire-webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/wireapp/wire-webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/wireapp/wire-webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/wireapp/wire-webapp/contents/{+path}","compare_url":"https://api.github.com/repos/wireapp/wire-webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wireapp/wire-webapp/merges","archive_url":"https://api.github.com/repos/wireapp/wire-webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wireapp/wire-webapp/downloads","issues_url":"https://api.github.com/repos/wireapp/wire-webapp/issues{/number}","pulls_url":"https://api.github.com/repos/wireapp/wire-webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/wireapp/wire-webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/wireapp/wire-webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wireapp/wire-webapp/labels{/name}","releases_url":"https://api.github.com/repos/wireapp/wire-webapp/releases{/id}","deployments_url":"https://api.github.com/repos/wireapp/wire-webapp/deployments","created_at":"2016-07-21T15:34:05Z","updated_at":"2019-02-28T13:22:50Z","pushed_at":"2019-02-28T13:22:50Z","git_url":"git://github.com/wireapp/wire-webapp.git","ssh_url":"git@github.com:wireapp/wire-webapp.git","clone_url":"https://github.com/wireapp/wire-webapp.git","svn_url":"https://github.com/wireapp/wire-webapp","homepage":"https://app.wire.com","size":36346,"stargazers_count":845,"watchers_count":845,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":187,"mirror_url":null,"archived":false,"open_issues_count":48,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":187,"open_issues":48,"watchers":845,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/wireapp/wire-webapp/pulls/5922"},"html":{"href":"https://github.com/wireapp/wire-webapp/pull/5922"},"issue":{"href":"https://api.github.com/repos/wireapp/wire-webapp/issues/5922"},"comments":{"href":"https://api.github.com/repos/wireapp/wire-webapp/issues/5922/comments"},"review_comments":{"href":"https://api.github.com/repos/wireapp/wire-webapp/pulls/5922/comments"},"review_comment":{"href":"https://api.github.com/repos/wireapp/wire-webapp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wireapp/wire-webapp/pulls/5922/commits"},"statuses":{"href":"https://api.github.com/repos/wireapp/wire-webapp/statuses/abfcc9f3cb8b511435386b88269beab536e3b373"}},"author_association":"CONTRIBUTOR"}}
other: {"actor":{"display_login":"AndyLnd"}}