{"action":"created","comment":{"url":"https://api.github.com/repos/SimplaElements/simpla-admin/pulls/comments/116183105","pull_request_review_id":37786709,"id":116183105,"diff_hunk":"@@ -67,60 +66,56 @@ function isSimplaName(name) {\n }\n \n /**\n- * Check if the given element is a Simpla Element\n- * @param  {Node}  node   Node to check\n- * @return {Boolean}      True if node is a Simpla Element\n+ * Returns an array of elements in a nodeList\n+ * @param  {NodeList} list Nodelist to filter\n+ * @return {HTMLElement[]} Array of element nodes\n  */\n-function isSimplaElement(node) {\n-  if (isSimplaName(node.localName)) {\n-    return true;\n-  }\n-\n-  return node.getAttribute && isSimplaName(node.getAttribute('is'));\n+function elementsIn(list) {\n+  return Array.prototype.filter.call(list, node => node.nodeType === 1);\n }\n \n /**\n- * Checks if the given node is an editable element. Editable means the element\n- *  is a Simpla Element and it is not a special ignored element e.g. simpla-admin\n- * @param  {Node}   node  Node to check if it's an editable element\n- * @return {Boolean}      True if editable element, false otherwise\n+ * Check if the given element is a Simpla Element\n+ * @param  {HTMLElement}  element  Element to check\n+ * @return {Boolean}      True if node is a Simpla Element\n  */\n-function isEditableElement(node) {\n-  const ignored = (name) => ADMIN_ELEMENTS.includes(name),\n-        isEditableName = (name) => isSimplaName(name) && !ignored(name);\n-\n-  if (isEditableName(node.localName)) {\n+function isSimplaElement(element) {\n+  if (isSimplaName(element.localName)) {\n     return true;\n   }\n \n-  return isEditableName(node.getAttribute && node.getAttribute('is'));\n+  return isSimplaName(element.getAttribute('is'));\n }\n \n /**\n- * Get all editable elements in the given list.\n- * @param  {(NodeList|Node[])} list List of nodes to check\n- * @return {HTMLElement[]}          Array of editable elements\n+ * Get all editable elements in the given list\n+ * @param  {Array} elements Array of elements to check\n+ * @return {HTMLElement[]}  Array of editable elements\n  */\n-function editableElementsIn(list) {\n-  return Array.prototype.filter.call(list, isEditableElement);\n+function ignoredElementsIn(elements) {\n+  const shouldIgnore = element => isSimplaElement(element) ||","path":"src/utils/pointerEvents.js","position":60,"original_position":60,"commit_id":"fe5795fe96e8e767f0c3bdd7988686bbea08781c","original_commit_id":"fe5795fe96e8e767f0c3bdd7988686bbea08781c","user":{"login":"seaneking","id":6374876,"avatar_url":"https://avatars0.githubusercontent.com/u/6374876?v=3","gravatar_id":"","url":"https://api.github.com/users/seaneking","html_url":"https://github.com/seaneking","followers_url":"https://api.github.com/users/seaneking/followers","following_url":"https://api.github.com/users/seaneking/following{/other_user}","gists_url":"https://api.github.com/users/seaneking/gists{/gist_id}","starred_url":"https://api.github.com/users/seaneking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seaneking/subscriptions","organizations_url":"https://api.github.com/users/seaneking/orgs","repos_url":"https://api.github.com/users/seaneking/repos","events_url":"https://api.github.com/users/seaneking/events{/privacy}","received_events_url":"https://api.github.com/users/seaneking/received_events","type":"User","site_admin":false},"body":"Whoops! Should be a String.","created_at":"2017-05-12T09:03:08Z","updated_at":"2017-05-12T09:03:08Z","html_url":"https://github.com/SimplaElements/simpla-admin/pull/18#discussion_r116183105","pull_request_url":"https://api.github.com/repos/SimplaElements/simpla-admin/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/SimplaElements/simpla-admin/pulls/comments/116183105"},"html":{"href":"https://github.com/SimplaElements/simpla-admin/pull/18#discussion_r116183105"},"pull_request":{"href":"https://api.github.com/repos/SimplaElements/simpla-admin/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/SimplaElements/simpla-admin/pulls/18","id":120150956,"html_url":"https://github.com/SimplaElements/simpla-admin/pull/18","diff_url":"https://github.com/SimplaElements/simpla-admin/pull/18.diff","patch_url":"https://github.com/SimplaElements/simpla-admin/pull/18.patch","issue_url":"https://api.github.com/repos/SimplaElements/simpla-admin/issues/18","number":18,"state":"open","locked":false,"title":"Cleanup protectEditing and ignore shadow roots. Fixes #17","user":{"login":"seaneking","id":6374876,"avatar_url":"https://avatars0.githubusercontent.com/u/6374876?v=3","gravatar_id":"","url":"https://api.github.com/users/seaneking","html_url":"https://github.com/seaneking","followers_url":"https://api.github.com/users/seaneking/followers","following_url":"https://api.github.com/users/seaneking/following{/other_user}","gists_url":"https://api.github.com/users/seaneking/gists{/gist_id}","starred_url":"https://api.github.com/users/seaneking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seaneking/subscriptions","organizations_url":"https://api.github.com/users/seaneking/orgs","repos_url":"https://api.github.com/users/seaneking/repos","events_url":"https://api.github.com/users/seaneking/events{/privacy}","received_events_url":"https://api.github.com/users/seaneking/received_events","type":"User","site_admin":false},"body":null,"created_at":"2017-05-11T16:37:36Z","updated_at":"2017-05-12T09:03:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6004f78066089817973b493e612e9d9ba119a11a","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/SimplaElements/simpla-admin/pulls/18/commits","review_comments_url":"https://api.github.com/repos/SimplaElements/simpla-admin/pulls/18/comments","review_comment_url":"https://api.github.com/repos/SimplaElements/simpla-admin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SimplaElements/simpla-admin/issues/18/comments","statuses_url":"https://api.github.com/repos/SimplaElements/simpla-admin/statuses/fe5795fe96e8e767f0c3bdd7988686bbea08781c","head":{"label":"SimplaElements:cleanup-protect","ref":"cleanup-protect","sha":"fe5795fe96e8e767f0c3bdd7988686bbea08781c","user":{"login":"SimplaElements","id":17809461,"avatar_url":"https://avatars2.githubusercontent.com/u/17809461?v=3","gravatar_id":"","url":"https://api.github.com/users/SimplaElements","html_url":"https://github.com/SimplaElements","followers_url":"https://api.github.com/users/SimplaElements/followers","following_url":"https://api.github.com/users/SimplaElements/following{/other_user}","gists_url":"https://api.github.com/users/SimplaElements/gists{/gist_id}","starred_url":"https://api.github.com/users/SimplaElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimplaElements/subscriptions","organizations_url":"https://api.github.com/users/SimplaElements/orgs","repos_url":"https://api.github.com/users/SimplaElements/repos","events_url":"https://api.github.com/users/SimplaElements/events{/privacy}","received_events_url":"https://api.github.com/users/SimplaElements/received_events","type":"Organization","site_admin":false},"repo":{"id":81295765,"name":"simpla-admin","full_name":"SimplaElements/simpla-admin","owner":{"login":"SimplaElements","id":17809461,"avatar_url":"https://avatars2.githubusercontent.com/u/17809461?v=3","gravatar_id":"","url":"https://api.github.com/users/SimplaElements","html_url":"https://github.com/SimplaElements","followers_url":"https://api.github.com/users/SimplaElements/followers","following_url":"https://api.github.com/users/SimplaElements/following{/other_user}","gists_url":"https://api.github.com/users/SimplaElements/gists{/gist_id}","starred_url":"https://api.github.com/users/SimplaElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimplaElements/subscriptions","organizations_url":"https://api.github.com/users/SimplaElements/orgs","repos_url":"https://api.github.com/users/SimplaElements/repos","events_url":"https://api.github.com/users/SimplaElements/events{/privacy}","received_events_url":"https://api.github.com/users/SimplaElements/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SimplaElements/simpla-admin","description":"Beautiful, lightweight admin component for Simpla elements","fork":false,"url":"https://api.github.com/repos/SimplaElements/simpla-admin","forks_url":"https://api.github.com/repos/SimplaElements/simpla-admin/forks","keys_url":"https://api.github.com/repos/SimplaElements/simpla-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SimplaElements/simpla-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SimplaElements/simpla-admin/teams","hooks_url":"https://api.github.com/repos/SimplaElements/simpla-admin/hooks","issue_events_url":"https://api.github.com/repos/SimplaElements/simpla-admin/issues/events{/number}","events_url":"https://api.github.com/repos/SimplaElements/simpla-admin/events","assignees_url":"https://api.github.com/repos/SimplaElements/simpla-admin/assignees{/user}","branches_url":"https://api.github.com/repos/SimplaElements/simpla-admin/branches{/branch}","tags_url":"https://api.github.com/repos/SimplaElements/simpla-admin/tags","blobs_url":"https://api.github.com/repos/SimplaElements/simpla-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SimplaElements/simpla-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SimplaElements/simpla-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/SimplaElements/simpla-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SimplaElements/simpla-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/SimplaElements/simpla-admin/languages","stargazers_url":"https://api.github.com/repos/SimplaElements/simpla-admin/stargazers","contributors_url":"https://api.github.com/repos/SimplaElements/simpla-admin/contributors","subscribers_url":"https://api.github.com/repos/SimplaElements/simpla-admin/subscribers","subscription_url":"https://api.github.com/repos/SimplaElements/simpla-admin/subscription","commits_url":"https://api.github.com/repos/SimplaElements/simpla-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/SimplaElements/simpla-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/SimplaElements/simpla-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/SimplaElements/simpla-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/SimplaElements/simpla-admin/contents/{+path}","compare_url":"https://api.github.com/repos/SimplaElements/simpla-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SimplaElements/simpla-admin/merges","archive_url":"https://api.github.com/repos/SimplaElements/simpla-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SimplaElements/simpla-admin/downloads","issues_url":"https://api.github.com/repos/SimplaElements/simpla-admin/issues{/number}","pulls_url":"https://api.github.com/repos/SimplaElements/simpla-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/SimplaElements/simpla-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/SimplaElements/simpla-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SimplaElements/simpla-admin/labels{/name}","releases_url":"https://api.github.com/repos/SimplaElements/simpla-admin/releases{/id}","deployments_url":"https://api.github.com/repos/SimplaElements/simpla-admin/deployments","created_at":"2017-02-08T06:28:42Z","updated_at":"2017-05-09T09:14:59Z","pushed_at":"2017-05-11T16:42:44Z","git_url":"git://github.com/SimplaElements/simpla-admin.git","ssh_url":"git@github.com:SimplaElements/simpla-admin.git","clone_url":"https://github.com/SimplaElements/simpla-admin.git","svn_url":"https://github.com/SimplaElements/simpla-admin","homepage":"https://www.simpla.io","size":186,"stargazers_count":6,"watchers_count":6,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":7,"forks":3,"open_issues":7,"watchers":6,"default_branch":"master"}},"base":{"label":"SimplaElements:master","ref":"master","sha":"4d0f4cc385db1f5c7849009f3d830b186b30ebb5","user":{"login":"SimplaElements","id":17809461,"avatar_url":"https://avatars2.githubusercontent.com/u/17809461?v=3","gravatar_id":"","url":"https://api.github.com/users/SimplaElements","html_url":"https://github.com/SimplaElements","followers_url":"https://api.github.com/users/SimplaElements/followers","following_url":"https://api.github.com/users/SimplaElements/following{/other_user}","gists_url":"https://api.github.com/users/SimplaElements/gists{/gist_id}","starred_url":"https://api.github.com/users/SimplaElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimplaElements/subscriptions","organizations_url":"https://api.github.com/users/SimplaElements/orgs","repos_url":"https://api.github.com/users/SimplaElements/repos","events_url":"https://api.github.com/users/SimplaElements/events{/privacy}","received_events_url":"https://api.github.com/users/SimplaElements/received_events","type":"Organization","site_admin":false},"repo":{"id":81295765,"name":"simpla-admin","full_name":"SimplaElements/simpla-admin","owner":{"login":"SimplaElements","id":17809461,"avatar_url":"https://avatars2.githubusercontent.com/u/17809461?v=3","gravatar_id":"","url":"https://api.github.com/users/SimplaElements","html_url":"https://github.com/SimplaElements","followers_url":"https://api.github.com/users/SimplaElements/followers","following_url":"https://api.github.com/users/SimplaElements/following{/other_user}","gists_url":"https://api.github.com/users/SimplaElements/gists{/gist_id}","starred_url":"https://api.github.com/users/SimplaElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimplaElements/subscriptions","organizations_url":"https://api.github.com/users/SimplaElements/orgs","repos_url":"https://api.github.com/users/SimplaElements/repos","events_url":"https://api.github.com/users/SimplaElements/events{/privacy}","received_events_url":"https://api.github.com/users/SimplaElements/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SimplaElements/simpla-admin","description":"Beautiful, lightweight admin component for Simpla elements","fork":false,"url":"https://api.github.com/repos/SimplaElements/simpla-admin","forks_url":"https://api.github.com/repos/SimplaElements/simpla-admin/forks","keys_url":"https://api.github.com/repos/SimplaElements/simpla-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SimplaElements/simpla-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SimplaElements/simpla-admin/teams","hooks_url":"https://api.github.com/repos/SimplaElements/simpla-admin/hooks","issue_events_url":"https://api.github.com/repos/SimplaElements/simpla-admin/issues/events{/number}","events_url":"https://api.github.com/repos/SimplaElements/simpla-admin/events","assignees_url":"https://api.github.com/repos/SimplaElements/simpla-admin/assignees{/user}","branches_url":"https://api.github.com/repos/SimplaElements/simpla-admin/branches{/branch}","tags_url":"https://api.github.com/repos/SimplaElements/simpla-admin/tags","blobs_url":"https://api.github.com/repos/SimplaElements/simpla-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SimplaElements/simpla-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SimplaElements/simpla-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/SimplaElements/simpla-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SimplaElements/simpla-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/SimplaElements/simpla-admin/languages","stargazers_url":"https://api.github.com/repos/SimplaElements/simpla-admin/stargazers","contributors_url":"https://api.github.com/repos/SimplaElements/simpla-admin/contributors","subscribers_url":"https://api.github.com/repos/SimplaElements/simpla-admin/subscribers","subscription_url":"https://api.github.com/repos/SimplaElements/simpla-admin/subscription","commits_url":"https://api.github.com/repos/SimplaElements/simpla-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/SimplaElements/simpla-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/SimplaElements/simpla-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/SimplaElements/simpla-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/SimplaElements/simpla-admin/contents/{+path}","compare_url":"https://api.github.com/repos/SimplaElements/simpla-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SimplaElements/simpla-admin/merges","archive_url":"https://api.github.com/repos/SimplaElements/simpla-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SimplaElements/simpla-admin/downloads","issues_url":"https://api.github.com/repos/SimplaElements/simpla-admin/issues{/number}","pulls_url":"https://api.github.com/repos/SimplaElements/simpla-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/SimplaElements/simpla-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/SimplaElements/simpla-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SimplaElements/simpla-admin/labels{/name}","releases_url":"https://api.github.com/repos/SimplaElements/simpla-admin/releases{/id}","deployments_url":"https://api.github.com/repos/SimplaElements/simpla-admin/deployments","created_at":"2017-02-08T06:28:42Z","updated_at":"2017-05-09T09:14:59Z","pushed_at":"2017-05-11T16:42:44Z","git_url":"git://github.com/SimplaElements/simpla-admin.git","ssh_url":"git@github.com:SimplaElements/simpla-admin.git","clone_url":"https://github.com/SimplaElements/simpla-admin.git","svn_url":"https://github.com/SimplaElements/simpla-admin","homepage":"https://www.simpla.io","size":186,"stargazers_count":6,"watchers_count":6,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":7,"forks":3,"open_issues":7,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SimplaElements/simpla-admin/pulls/18"},"html":{"href":"https://github.com/SimplaElements/simpla-admin/pull/18"},"issue":{"href":"https://api.github.com/repos/SimplaElements/simpla-admin/issues/18"},"comments":{"href":"https://api.github.com/repos/SimplaElements/simpla-admin/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/SimplaElements/simpla-admin/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/SimplaElements/simpla-admin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SimplaElements/simpla-admin/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/SimplaElements/simpla-admin/statuses/fe5795fe96e8e767f0c3bdd7988686bbea08781c"}}}}
{"actor":{"display_login":"seaneking"}}