{"action":"created","comment":{"url":"https://api.github.com/repos/readcrx-2/read.crx-2/pulls/comments/82130317","pull_request_review_id":3057966,"id":82130317,"diff_hunk":"@@ -0,0 +1,144 @@\n+window.UI ?= {}\n+\n+###*\n+@namespace UI\n+@class PopupView\n+@constructor\n+@param {Element} default_parent\n+###\n+class UI.PopupView\n+  \"use strict\"\n+\n+  constructor: (@default_parent)->\n+    ###*\n+    @property _popupStack\n+    @type Array\n+    @private\n+    ###\n+    @_popupStack = []\n+\n+    ###*\n+    @property _popupArea\n+    @type Object\n+    @private\n+    ###\n+    @_popupArea = @default_parent.querySelector(\".popup_area\")\n+\n+    return\n+\n+  ###*\n+  @method show\n+  @param {Element} popup\n+  @param {Number} mouseX\n+  @param {Number} mouseY\n+  @param {Element} source\n+  ###\n+  show: (@popup, @mouseX, @mouseY, @source) ->\n+\n+    remove = (forceRemove = false) =>\n+      while @_popupStack.length > 0\n+        popupInfo = @_popupStack[@_popupStack.length - 1]\n+        # 末端の非アクティブ・ノードを選択\n+        break if forceRemove is false and\n+                (popupInfo.source.classList.contains(\"active\") or\n+                popupInfo.popup.classList.contains(\"active\"))\n+        # 該当ノードの除去\n+        popupInfo.source.removeEventListener(\"mouseenter\", on_mouseenter)\n+        popupInfo.source.removeEventListener(\"mouseleave\", on_mouseleave)\n+        popupInfo.popup.removeEventListener(\"mouseenter\", on_mouseenter)\n+        popupInfo.popup.removeEventListener(\"mouseleave\", on_mouseleave)\n+        popupInfo.source.classList.remove(\"popup_source\")\n+        @_popupArea.removeChild(popupInfo.popup)\n+        @_popupStack.pop()\n+        null\n+      return\n+\n+    on_mouseenter = ->\n+      @classList.add(\"active\")\n+      return\n+\n+    on_mouseleave = ->\n+      @classList.remove(\"active\")\n+      setTimeout(remove, 300)\n+      return\n+\n+    #同一ソースからのポップアップが既に有る場合は、処理を中断\n+    if @_popupStack.length > 0\n+      popupInfo = @_popupStack[@_popupStack.length - 1]\n+      return if Object.is(@source, popupInfo.source)\n+\n+    #sourceがpopup内のものならば、兄弟ノードの削除\n+    #それ以外は、全てのノードを削除\n+    if @source.closest(\".popup\")\n+      @source.classList.remove(\"active\")\n+      remove(false)\n+    else\n+      remove(true)\n+\n+    #表示位置決定\n+    $ =>","path":"src/ui/PopupView.coffee","position":null,"original_position":79,"commit_id":"a83b310155141cf1c3703a3939b4bd51577bbd96","original_commit_id":"0e48d01777744500b7f1ab5040798c83ea54909e","user":{"login":"S--Minecraft","id":7892988,"avatar_url":"https://avatars.githubusercontent.com/u/7892988?v=3","gravatar_id":"","url":"https://api.github.com/users/S--Minecraft","html_url":"https://github.com/S--Minecraft","followers_url":"https://api.github.com/users/S--Minecraft/followers","following_url":"https://api.github.com/users/S--Minecraft/following{/other_user}","gists_url":"https://api.github.com/users/S--Minecraft/gists{/gist_id}","starred_url":"https://api.github.com/users/S--Minecraft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/S--Minecraft/subscriptions","organizations_url":"https://api.github.com/users/S--Minecraft/orgs","repos_url":"https://api.github.com/users/S--Minecraft/repos","events_url":"https://api.github.com/users/S--Minecraft/events{/privacy}","received_events_url":"https://api.github.com/users/S--Minecraft/received_events","type":"User","site_admin":false},"body":"$->は有効にするというよりDOMが操作できる状態になる前待ってそのコールバックを実行する関数ですね","created_at":"2016-10-06T07:29:30Z","updated_at":"2016-10-06T07:29:30Z","html_url":"https://github.com/readcrx-2/read.crx-2/pull/186#discussion_r82130317","pull_request_url":"https://api.github.com/repos/readcrx-2/read.crx-2/pulls/186","_links":{"self":{"href":"https://api.github.com/repos/readcrx-2/read.crx-2/pulls/comments/82130317"},"html":{"href":"https://github.com/readcrx-2/read.crx-2/pull/186#discussion_r82130317"},"pull_request":{"href":"https://api.github.com/repos/readcrx-2/read.crx-2/pulls/186"}}},"pull_request":{"url":"https://api.github.com/repos/readcrx-2/read.crx-2/pulls/186","id":87881567,"html_url":"https://github.com/readcrx-2/read.crx-2/pull/186","diff_url":"https://github.com/readcrx-2/read.crx-2/pull/186.diff","patch_url":"https://github.com/readcrx-2/read.crx-2/pull/186.patch","issue_url":"https://api.github.com/repos/readcrx-2/read.crx-2/issues/186","number":186,"state":"open","locked":false,"title":"Fix: popup画面の書き換え(popup同士のchainを廃止)","user":{"login":"awazi","id":22058979,"avatar_url":"https://avatars.githubusercontent.com/u/22058979?v=3","gravatar_id":"","url":"https://api.github.com/users/awazi","html_url":"https://github.com/awazi","followers_url":"https://api.github.com/users/awazi/followers","following_url":"https://api.github.com/users/awazi/following{/other_user}","gists_url":"https://api.github.com/users/awazi/gists{/gist_id}","starred_url":"https://api.github.com/users/awazi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awazi/subscriptions","organizations_url":"https://api.github.com/users/awazi/orgs","repos_url":"https://api.github.com/users/awazi/repos","events_url":"https://api.github.com/users/awazi/events{/privacy}","received_events_url":"https://api.github.com/users/awazi/received_events","type":"User","site_admin":false},"body":"追加予定のvideo Elementに対応するため、popup画面の書き換えを行いました。\r\n表示位置の決定以外は全て新規に作成しましたが、現行のものと動きは同じはずです。\r\n\r\n変更理由\r\n1. .popupではposition: fixed;が指定されているが、.thumnailと新設の.mediaviewerでは\r\nposition: relative;が指定されているため、別のスタックレイヤーが作成されていると思われる。\r\n2. 現行ではsourceにpopupをappendする形で親子関係を築き、表示用データとリンク用データを\r\n兼用している。\r\n3. 別のスタックレイヤーが作成されている状態で新たに子要素を表示する際に、何らかの理由で\r\n子要素が別のスタックレイヤーに入り込んでしまうことがあるのではないかと推測される。\r\n\r\n対応策\r\n1. popupの親子関係を解消し、表示用データとリンク用データを別々に管理する。\r\n2. html上に専用の.popup_areaを設け、popup用データの書き込みを行う。\r\n\r\n先にもお話したようにjavascriptに関しては詳しくないため、おかしな点もあるかと思いますが、\r\n確認をおねがいします。","created_at":"2016-10-04T12:10:17Z","updated_at":"2016-10-06T07:29:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b436ca7c93ee08d65e30dc72c5d2c1427db991f2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/readcrx-2/read.crx-2/pulls/186/commits","review_comments_url":"https://api.github.com/repos/readcrx-2/read.crx-2/pulls/186/comments","review_comment_url":"https://api.github.com/repos/readcrx-2/read.crx-2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/readcrx-2/read.crx-2/issues/186/comments","statuses_url":"https://api.github.com/repos/readcrx-2/read.crx-2/statuses/a83b310155141cf1c3703a3939b4bd51577bbd96","head":{"label":"awazi:fix6","ref":"fix6","sha":"a83b310155141cf1c3703a3939b4bd51577bbd96","user":{"login":"awazi","id":22058979,"avatar_url":"https://avatars.githubusercontent.com/u/22058979?v=3","gravatar_id":"","url":"https://api.github.com/users/awazi","html_url":"https://github.com/awazi","followers_url":"https://api.github.com/users/awazi/followers","following_url":"https://api.github.com/users/awazi/following{/other_user}","gists_url":"https://api.github.com/users/awazi/gists{/gist_id}","starred_url":"https://api.github.com/users/awazi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awazi/subscriptions","organizations_url":"https://api.github.com/users/awazi/orgs","repos_url":"https://api.github.com/users/awazi/repos","events_url":"https://api.github.com/users/awazi/events{/privacy}","received_events_url":"https://api.github.com/users/awazi/received_events","type":"User","site_admin":false},"repo":{"id":67873463,"name":"read.crx-2","full_name":"awazi/read.crx-2","owner":{"login":"awazi","id":22058979,"avatar_url":"https://avatars.githubusercontent.com/u/22058979?v=3","gravatar_id":"","url":"https://api.github.com/users/awazi","html_url":"https://github.com/awazi","followers_url":"https://api.github.com/users/awazi/followers","following_url":"https://api.github.com/users/awazi/following{/other_user}","gists_url":"https://api.github.com/users/awazi/gists{/gist_id}","starred_url":"https://api.github.com/users/awazi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awazi/subscriptions","organizations_url":"https://api.github.com/users/awazi/orgs","repos_url":"https://api.github.com/users/awazi/repos","events_url":"https://api.github.com/users/awazi/events{/privacy}","received_events_url":"https://api.github.com/users/awazi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/awazi/read.crx-2","description":"Chromeアプリな2chブラウザ","fork":true,"url":"https://api.github.com/repos/awazi/read.crx-2","forks_url":"https://api.github.com/repos/awazi/read.crx-2/forks","keys_url":"https://api.github.com/repos/awazi/read.crx-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awazi/read.crx-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awazi/read.crx-2/teams","hooks_url":"https://api.github.com/repos/awazi/read.crx-2/hooks","issue_events_url":"https://api.github.com/repos/awazi/read.crx-2/issues/events{/number}","events_url":"https://api.github.com/repos/awazi/read.crx-2/events","assignees_url":"https://api.github.com/repos/awazi/read.crx-2/assignees{/user}","branches_url":"https://api.github.com/repos/awazi/read.crx-2/branches{/branch}","tags_url":"https://api.github.com/repos/awazi/read.crx-2/tags","blobs_url":"https://api.github.com/repos/awazi/read.crx-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awazi/read.crx-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awazi/read.crx-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/awazi/read.crx-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awazi/read.crx-2/statuses/{sha}","languages_url":"https://api.github.com/repos/awazi/read.crx-2/languages","stargazers_url":"https://api.github.com/repos/awazi/read.crx-2/stargazers","contributors_url":"https://api.github.com/repos/awazi/read.crx-2/contributors","subscribers_url":"https://api.github.com/repos/awazi/read.crx-2/subscribers","subscription_url":"https://api.github.com/repos/awazi/read.crx-2/subscription","commits_url":"https://api.github.com/repos/awazi/read.crx-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/awazi/read.crx-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/awazi/read.crx-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/awazi/read.crx-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/awazi/read.crx-2/contents/{+path}","compare_url":"https://api.github.com/repos/awazi/read.crx-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awazi/read.crx-2/merges","archive_url":"https://api.github.com/repos/awazi/read.crx-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awazi/read.crx-2/downloads","issues_url":"https://api.github.com/repos/awazi/read.crx-2/issues{/number}","pulls_url":"https://api.github.com/repos/awazi/read.crx-2/pulls{/number}","milestones_url":"https://api.github.com/repos/awazi/read.crx-2/milestones{/number}","notifications_url":"https://api.github.com/repos/awazi/read.crx-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awazi/read.crx-2/labels{/name}","releases_url":"https://api.github.com/repos/awazi/read.crx-2/releases{/id}","deployments_url":"https://api.github.com/repos/awazi/read.crx-2/deployments","created_at":"2016-09-10T13:46:55Z","updated_at":"2016-09-10T13:46:56Z","pushed_at":"2016-10-06T07:12:02Z","git_url":"git://github.com/awazi/read.crx-2.git","ssh_url":"git@github.com:awazi/read.crx-2.git","clone_url":"https://github.com/awazi/read.crx-2.git","svn_url":"https://github.com/awazi/read.crx-2","homepage":"https://readcrx-2.github.io/read.crx-2/","size":10646,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"readcrx-2:develop","ref":"develop","sha":"37b8840468adf91403d4aafb651bc88b97d6244d","user":{"login":"readcrx-2","id":13446646,"avatar_url":"https://avatars.githubusercontent.com/u/13446646?v=3","gravatar_id":"","url":"https://api.github.com/users/readcrx-2","html_url":"https://github.com/readcrx-2","followers_url":"https://api.github.com/users/readcrx-2/followers","following_url":"https://api.github.com/users/readcrx-2/following{/other_user}","gists_url":"https://api.github.com/users/readcrx-2/gists{/gist_id}","starred_url":"https://api.github.com/users/readcrx-2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/readcrx-2/subscriptions","organizations_url":"https://api.github.com/users/readcrx-2/orgs","repos_url":"https://api.github.com/users/readcrx-2/repos","events_url":"https://api.github.com/users/readcrx-2/events{/privacy}","received_events_url":"https://api.github.com/users/readcrx-2/received_events","type":"Organization","site_admin":false},"repo":{"id":32802362,"name":"read.crx-2","full_name":"readcrx-2/read.crx-2","owner":{"login":"readcrx-2","id":13446646,"avatar_url":"https://avatars.githubusercontent.com/u/13446646?v=3","gravatar_id":"","url":"https://api.github.com/users/readcrx-2","html_url":"https://github.com/readcrx-2","followers_url":"https://api.github.com/users/readcrx-2/followers","following_url":"https://api.github.com/users/readcrx-2/following{/other_user}","gists_url":"https://api.github.com/users/readcrx-2/gists{/gist_id}","starred_url":"https://api.github.com/users/readcrx-2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/readcrx-2/subscriptions","organizations_url":"https://api.github.com/users/readcrx-2/orgs","repos_url":"https://api.github.com/users/readcrx-2/repos","events_url":"https://api.github.com/users/readcrx-2/events{/privacy}","received_events_url":"https://api.github.com/users/readcrx-2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/readcrx-2/read.crx-2","description":"Chromeアプリな2chブラウザ","fork":true,"url":"https://api.github.com/repos/readcrx-2/read.crx-2","forks_url":"https://api.github.com/repos/readcrx-2/read.crx-2/forks","keys_url":"https://api.github.com/repos/readcrx-2/read.crx-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/readcrx-2/read.crx-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/readcrx-2/read.crx-2/teams","hooks_url":"https://api.github.com/repos/readcrx-2/read.crx-2/hooks","issue_events_url":"https://api.github.com/repos/readcrx-2/read.crx-2/issues/events{/number}","events_url":"https://api.github.com/repos/readcrx-2/read.crx-2/events","assignees_url":"https://api.github.com/repos/readcrx-2/read.crx-2/assignees{/user}","branches_url":"https://api.github.com/repos/readcrx-2/read.crx-2/branches{/branch}","tags_url":"https://api.github.com/repos/readcrx-2/read.crx-2/tags","blobs_url":"https://api.github.com/repos/readcrx-2/read.crx-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/readcrx-2/read.crx-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/readcrx-2/read.crx-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/readcrx-2/read.crx-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/readcrx-2/read.crx-2/statuses/{sha}","languages_url":"https://api.github.com/repos/readcrx-2/read.crx-2/languages","stargazers_url":"https://api.github.com/repos/readcrx-2/read.crx-2/stargazers","contributors_url":"https://api.github.com/repos/readcrx-2/read.crx-2/contributors","subscribers_url":"https://api.github.com/repos/readcrx-2/read.crx-2/subscribers","subscription_url":"https://api.github.com/repos/readcrx-2/read.crx-2/subscription","commits_url":"https://api.github.com/repos/readcrx-2/read.crx-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/readcrx-2/read.crx-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/readcrx-2/read.crx-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/readcrx-2/read.crx-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/readcrx-2/read.crx-2/contents/{+path}","compare_url":"https://api.github.com/repos/readcrx-2/read.crx-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/readcrx-2/read.crx-2/merges","archive_url":"https://api.github.com/repos/readcrx-2/read.crx-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/readcrx-2/read.crx-2/downloads","issues_url":"https://api.github.com/repos/readcrx-2/read.crx-2/issues{/number}","pulls_url":"https://api.github.com/repos/readcrx-2/read.crx-2/pulls{/number}","milestones_url":"https://api.github.com/repos/readcrx-2/read.crx-2/milestones{/number}","notifications_url":"https://api.github.com/repos/readcrx-2/read.crx-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/readcrx-2/read.crx-2/labels{/name}","releases_url":"https://api.github.com/repos/readcrx-2/read.crx-2/releases{/id}","deployments_url":"https://api.github.com/repos/readcrx-2/read.crx-2/deployments","created_at":"2015-03-24T14:03:26Z","updated_at":"2016-08-25T14:38:51Z","pushed_at":"2016-10-06T07:12:03Z","git_url":"git://github.com/readcrx-2/read.crx-2.git","ssh_url":"git@github.com:readcrx-2/read.crx-2.git","clone_url":"https://github.com/readcrx-2/read.crx-2.git","svn_url":"https://github.com/readcrx-2/read.crx-2","homepage":"https://readcrx-2.github.io/read.crx-2/","size":12131,"stargazers_count":16,"watchers_count":16,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":21,"forks":7,"open_issues":21,"watchers":16,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/readcrx-2/read.crx-2/pulls/186"},"html":{"href":"https://github.com/readcrx-2/read.crx-2/pull/186"},"issue":{"href":"https://api.github.com/repos/readcrx-2/read.crx-2/issues/186"},"comments":{"href":"https://api.github.com/repos/readcrx-2/read.crx-2/issues/186/comments"},"review_comments":{"href":"https://api.github.com/repos/readcrx-2/read.crx-2/pulls/186/comments"},"review_comment":{"href":"https://api.github.com/repos/readcrx-2/read.crx-2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/readcrx-2/read.crx-2/pulls/186/commits"},"statuses":{"href":"https://api.github.com/repos/readcrx-2/read.crx-2/statuses/a83b310155141cf1c3703a3939b4bd51577bbd96"}}}}
{"actor":{"display_login":"S--Minecraft"}}