Преглед на файлове

ruby: fix "show source"

Fixes #1922.
Simon Legner преди 2 години
родител
ревизия
5c6d93f61b
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      assets/javascripts/views/pages/rdoc.coffee

+ 1 - 1
assets/javascripts/views/pages/rdoc.coffee

@@ -8,7 +8,7 @@ class app.views.RdocPage extends app.views.BasePage
     return unless event.target.classList.contains 'method-click-advice'
     $.stopEvent(event)
 
-    source = $ '.method-source-code', event.target.parentNode.parentNode
+    source = $ '.method-source-code', event.target.closest('.method-detail')
     isShown = source.style.display is 'block'
 
     source.style.display = if isShown then 'none' else 'block'