History

ruby: fix "show source"

Fixes #1922.

Simon Legner committed 3 years ago

Commit 5c6d93f1 parent abf659f1 file · +1 −1Browse files

Unified · Split

assets/javascripts/views/pages/rdoc.coffee+1−1
@@ -8,7 +8,7 @@ class app.views.RdocPage extends app.views.BasePage · 7 unmodified lines
8 return unless event.target.classList.contains 'method-click-advice'8 return unless event.target.classList.contains 'method-click-advice'
9 $.stopEvent(event)9 $.stopEvent(event)
10 10
11 source = $ '.method-source-code', event.target.parentNode.parentNode11 source = $ '.method-source-code', event.target.closest('.method-detail')
12 isShown = source.style.display is 'block'12 isShown = source.style.display is 'block'
13 13
14 source.style.display = if isShown then 'none' else 'block'14 source.style.display = if isShown then 'none' else 'block'