Ref #25.
Showing the changes to assets/javascripts/views (1 of 3 files). Show all
Unified · Split
| @@ -24,7 +24,7 @@ class app.views.SidebarHover extends app.View · 23 unmodified lines | |||
| 24 | show: (el) -> | 24 | show: (el) -> |
| 25 | unless el is @cursor | 25 | unless el is @cursor |
| 26 | @hide() | 26 | @hide() |
| 27 | if @isTarget(el) and @isTruncated(el) | 27 | if @isTarget(el) and @isTruncated(el.lastElementChild or el) |
| 28 | @cursor = el | 28 | @cursor = el |
| 29 | @clone = @makeClone @cursor | 29 | @clone = @makeClone @cursor |
| 30 | $.append document.body, @clone | 30 | $.append document.body, @clone |
| @@ -48,8 +48,7 @@ class app.views.SidebarHover extends app.View · 17 unmodified lines | |||
| 48 | return | 48 | return |
| 49 | 49 | ||
| 50 | makeClone: (el) -> | 50 | makeClone: (el) -> |
| 51 | clone = el.cloneNode() | 51 | clone = el.cloneNode(true) |
| 52 | clone.textContent = el.textContent | ||
| 53 | clone.classList.add 'clone' | 52 | clone.classList.add 'clone' |
| 54 | clone | 53 | clone |
| 55 | 54 | ||