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 | 24 | show: (el) -> |
| 25 | 25 | unless el is @cursor |
| 26 | 26 | @hide() |
| 27 | − if @isTarget(el) and @isTruncated(el) | |
| 27 | + if @isTarget(el) and @isTruncated(el.lastElementChild or el) | |
| 28 | 28 | @cursor = el |
| 29 | 29 | @clone = @makeClone @cursor |
| 30 | 30 | $.append document.body, @clone |
| @@ -48,8 +48,7 @@ class app.views.SidebarHover extends app.View · 17 unmodified lines | ||
| 48 | 48 | return |
| 49 | 49 | |
| 50 | 50 | makeClone: (el) -> |
| 51 | − clone = el.cloneNode() | |
| 52 | − clone.textContent = el.textContent | |
| 51 | + clone = el.cloneNode(true) | |
| 53 | 52 | clone.classList.add 'clone' |
| 54 | 53 | clone |
| 55 | 54 | |