Commit:    6cec58d94b1357b907389e4b5123de85176bf635
Author:    JayPHP <[email protected]>         Tue, 25 Apr 2017 
13:19:52 +0100
Committer: GitHub <[email protected]>      Tue, 25 Apr 2017 13:19:52 +0100
Parents:   3b52af0eea466ca2d5a906fa24659f901af0ba8d
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=6cec58d94b1357b907389e4b5123de85176bf635

Log:
Use exact word for parameter scroll #74493

https://bugs.php.net/bug.php?id=74493

Bugs:
https://bugs.php.net/74493

Changed paths:
  M  js/common.js


Diff:
diff --git a/js/common.js b/js/common.js
index 4617432..ef2a61e 100644
--- a/js/common.js
+++ b/js/common.js
@@ -407,9 +407,9 @@ $(document).ready(function() {
     $('.refentry code.parameter').click(function(event)
     {
       var id = $(this).text().replace(/^[&$]{0,2}/g, '');
-      var offsetTop = $(
-        '.parameters .parameter:contains("' + id + '"), .options 
.parameter:contains("' + id + '")'
-      ).offset().top - 52;
+      var offsetTop = $('.parameters, 
.options').find('.parameter').filter(function() {
+          return $(this).text() === id;
+      }).offset().top - 52;
       $.scrollTo({top: offsetTop, left: 0}, 400);
     });


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to