src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/script.js
author hannesw
Wed, 27 Nov 2019 13:08:16 +0100
changeset 59294 48b88b9c11eb
parent 54598 a9953a8ccd66
permissions -rw-r--r--
8223378: CSS solution for navbar problem with <a> elements is not ideal Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
     1
/*
50167
cc705c956798 8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents: 47447
diff changeset
     2
 * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
     4
 *
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    10
 *
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    15
 * accompanied this code).
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    16
 *
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    20
 *
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    23
 * questions.
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    24
 */
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    25
40511
1b3c502e0bdc 8155995: Update javadoc to include module search
bpatel
parents: 40229
diff changeset
    26
var moduleSearchIndex;
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    27
var packageSearchIndex;
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    28
var typeSearchIndex;
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    29
var memberSearchIndex;
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    30
var tagSearchIndex;
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    31
function loadScripts(doc, tag) {
54598
a9953a8ccd66 8222526: Use of no longer existing jquery directory in script.js
hannesw
parents: 54350
diff changeset
    32
    createElem(doc, tag, 'script-dir/jszip/dist/jszip.js');
a9953a8ccd66 8222526: Use of no longer existing jquery directory in script.js
hannesw
parents: 54350
diff changeset
    33
    createElem(doc, tag, 'script-dir/jszip-utils/dist/jszip-utils.js');
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    34
    if (window.navigator.userAgent.indexOf('MSIE ') > 0 || window.navigator.userAgent.indexOf('Trident/') > 0 ||
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    35
            window.navigator.userAgent.indexOf('Edge/') > 0) {
54598
a9953a8ccd66 8222526: Use of no longer existing jquery directory in script.js
hannesw
parents: 54350
diff changeset
    36
        createElem(doc, tag, 'script-dir/jszip-utils/dist/jszip-utils-ie.js');
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    37
    }
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    38
    createElem(doc, tag, 'search.js');
52868
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    39
40511
1b3c502e0bdc 8155995: Update javadoc to include module search
bpatel
parents: 40229
diff changeset
    40
    $.get(pathtoroot + "module-search-index.zip")
1b3c502e0bdc 8155995: Update javadoc to include module search
bpatel
parents: 40229
diff changeset
    41
            .done(function() {
1b3c502e0bdc 8155995: Update javadoc to include module search
bpatel
parents: 40229
diff changeset
    42
                JSZipUtils.getBinaryContent(pathtoroot + "module-search-index.zip", function(e, data) {
52868
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    43
                    JSZip.loadAsync(data).then(function(zip){
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    44
                        zip.file("module-search-index.json").async("text").then(function(content){
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    45
                            moduleSearchIndex = JSON.parse(content);
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    46
                        });
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    47
                    });
40511
1b3c502e0bdc 8155995: Update javadoc to include module search
bpatel
parents: 40229
diff changeset
    48
                });
1b3c502e0bdc 8155995: Update javadoc to include module search
bpatel
parents: 40229
diff changeset
    49
            });
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    50
    $.get(pathtoroot + "package-search-index.zip")
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    51
            .done(function() {
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    52
                JSZipUtils.getBinaryContent(pathtoroot + "package-search-index.zip", function(e, data) {
52868
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    53
                    JSZip.loadAsync(data).then(function(zip){
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    54
                        zip.file("package-search-index.json").async("text").then(function(content){
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    55
                            packageSearchIndex = JSON.parse(content);
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    56
                        });
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    57
                    });
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    58
                });
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    59
            });
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    60
    $.get(pathtoroot + "type-search-index.zip")
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    61
            .done(function() {
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    62
                JSZipUtils.getBinaryContent(pathtoroot + "type-search-index.zip", function(e, data) {
52868
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    63
                    JSZip.loadAsync(data).then(function(zip){
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    64
                        zip.file("type-search-index.json").async("text").then(function(content){
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    65
                            typeSearchIndex = JSON.parse(content);
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    66
                        });
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    67
                    });
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    68
                });
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    69
            });
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    70
    $.get(pathtoroot + "member-search-index.zip")
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    71
            .done(function() {
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    72
                JSZipUtils.getBinaryContent(pathtoroot + "member-search-index.zip", function(e, data) {
52868
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    73
                    JSZip.loadAsync(data).then(function(zip){
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    74
                        zip.file("member-search-index.json").async("text").then(function(content){
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    75
                            memberSearchIndex = JSON.parse(content);
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    76
                        });
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    77
                    });
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    78
                });
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    79
            });
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    80
    $.get(pathtoroot + "tag-search-index.zip")
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    81
            .done(function() {
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    82
                JSZipUtils.getBinaryContent(pathtoroot + "tag-search-index.zip", function(e, data) {
52868
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    83
                    JSZip.loadAsync(data).then(function(zip){
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    84
                        zip.file("tag-search-index.json").async("text").then(function(content){
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    85
                            tagSearchIndex = JSON.parse(content);
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    86
                        });
b4982a22926b 8214856: Errors with JSZip in web console after upgrade to 3.1.5
pmuthuswamy
parents: 52616
diff changeset
    87
                    });
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    88
                });
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
    89
            });
43370
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 42831
diff changeset
    90
    if (!moduleSearchIndex) {
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 42831
diff changeset
    91
        createElem(doc, tag, 'module-search-index.js');
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 42831
diff changeset
    92
    }
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 42831
diff changeset
    93
    if (!packageSearchIndex) {
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 42831
diff changeset
    94
        createElem(doc, tag, 'package-search-index.js');
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 42831
diff changeset
    95
    }
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 42831
diff changeset
    96
    if (!typeSearchIndex) {
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 42831
diff changeset
    97
        createElem(doc, tag, 'type-search-index.js');
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 42831
diff changeset
    98
    }
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 42831
diff changeset
    99
    if (!memberSearchIndex) {
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 42831
diff changeset
   100
        createElem(doc, tag, 'member-search-index.js');
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 42831
diff changeset
   101
    }
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 42831
diff changeset
   102
    if (!tagSearchIndex) {
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 42831
diff changeset
   103
        createElem(doc, tag, 'tag-search-index.js');
5969237f927c 8166175: javadoc search doesn't work on local doc bundles
bpatel
parents: 42831
diff changeset
   104
    }
33920
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   105
}
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   106
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   107
function createElem(doc, tag, path) {
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   108
    var script = doc.createElement(tag);
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   109
    var scriptElement = doc.getElementsByTagName(tag)[0];
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   110
    script.src = pathtoroot + path;
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   111
    scriptElement.parentNode.insertBefore(script, scriptElement);
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   112
}
bd731341c405 8141492: Implement search feature in javadoc
bpatel
parents: 25874
diff changeset
   113
50167
cc705c956798 8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents: 47447
diff changeset
   114
function show(type) {
14549
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
   115
    count = 0;
50167
cc705c956798 8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents: 47447
diff changeset
   116
    for (var key in data) {
14549
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
   117
        var row = document.getElementById(key);
50167
cc705c956798 8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents: 47447
diff changeset
   118
        if ((data[key] &  type) !== 0) {
14549
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
   119
            row.style.display = '';
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
   120
            row.className = (count++ % 2) ? rowColor : altColor;
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
   121
        }
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
   122
        else
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
   123
            row.style.display = 'none';
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
   124
    }
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
   125
    updateTabs(type);
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
   126
}
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
   127
50167
cc705c956798 8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents: 47447
diff changeset
   128
function updateTabs(type) {
52616
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   129
    var firstRow = document.getElementById(Object.keys(data)[0]);
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   130
    var table = firstRow.closest('table');
14549
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
   131
    for (var value in tabs) {
52616
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   132
        var tab = document.getElementById(tabs[value][0]);
14549
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
   133
        if (value == type) {
52616
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   134
            tab.className = activeTableTab;
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   135
            tab.innerHTML = tabs[value][1];
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   136
            tab.setAttribute('aria-selected', true);
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   137
            tab.setAttribute('tabindex',0);
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   138
            table.setAttribute('aria-labelledby', tabs[value][0]);
14549
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
   139
        }
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
   140
        else {
52616
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   141
            tab.className = tableTab;
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   142
            tab.setAttribute('aria-selected', false);
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   143
            tab.setAttribute('tabindex',-1);
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   144
            tab.setAttribute('onclick', "show("+ value + ")");
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   145
            tab.innerHTML = tabs[value][1];
14549
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
   146
        }
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
   147
    }
0599d73bf1da 8002304: Group methods by types in methods summary section
bpatel
parents:
diff changeset
   148
}
40229
09f4478d07e5 8154817: Fix the click-through navigation for modules
bpatel
parents: 35426
diff changeset
   149
52616
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   150
function switchTab(e) {
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   151
    if (e.keyCode == 37 || e.keyCode == 38) {
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   152
        $("[aria-selected=true]").prev().click().focus();
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   153
        e.preventDefault();
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   154
    }
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   155
    if (e.keyCode == 39 || e.keyCode == 40) {
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   156
        $("[aria-selected=true]").next().click().focus();
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   157
        e.preventDefault();
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   158
    }
1a395165c09b 8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents: 50167
diff changeset
   159
}