no outline style: by setting tabindex=-1 and fire element.focus() after new page load

RESOLVED DUPLICATE of bug 645776

Status

()

Core
General
RESOLVED DUPLICATE of bug 645776
7 years ago
7 years ago

People

(Reporter: Thomas, Unassigned)

Tracking

({regression, testcase})

Trunk
x86
Windows XP
regression, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0

There is no dotted outline style if the user loads a new page (with no page style) and setting the tabindex=-1 of an element by activating a JavaScript function that will focus that element by element.focus() for an extended navigation.

Reproducible: Always

Steps to Reproduce:
1. set no page style (/view/page style/no style)
2. new page load (any)
3. do not press the tabular key
4. get an element per JavaScript and set: element.setAttribute("tabindex", -1);
5. after that focus that element with element.focus();
Actual Results:  
see no visible dotted outline style for that element

Expected Results:  
see visible dotted outline style for that element

Steps to Reproduce for a better example:
1. set no page style (/view/page style/no style)
2. new page load (any)
3. pressing the tabular key (first focusable element will be dotted around)
4. get an element per Javascript and set: element.setAttribute("tabindex", -1);
5. focus that element with element.focus();

Result:
see visible dotted outline style for that element
Can you hook up a Testcase showing the Issue and check if it works okay in any previous Firefox Versions?
(Reporter)

Comment 2

7 years ago
The testcase works in Firefox 3 and not in Firefox 4 RC1!

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
    <head>
        <title>Test outline tabindex</title>
    </head>
    <body>
        <div id="container">
            <p>This container have to be outlined by the button</p>
        </div>
        <input id="testcase" type="button" value="test" />
        <script>
            document.getElementById("testcase").addEventListener("click",click,false);
            function click(){
                var container = document.getElementById("container");
                container.setAttribute("tabindex", -1);
                container.focus();
            }
        </script>
    </body>
</html>
(Reporter)

Comment 3

7 years ago
I think it's not only for HTML5!!!
(Reporter)

Comment 4

7 years ago
1. not working: after page load (testcase) pressing the button.

2. working: after page load (testcase) pressing the tabular key at first and then pressing the button.

Comment 5

7 years ago
Regression Range :
works:
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a5pre) Gecko/20100421 Minefield/3.7a5pre
broken:
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a5pre) Gecko/20100422 Minefield/3.7a5pre
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=cdc8bf25220e&tochange=cb8f60ee7c23
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: General → General
Keywords: regression, testcase
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → Trunk
Created attachment 524012 [details]
Reporter's Testcase

Maybe caused by Bug 418521?
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 645776
You need to log in before you can comment on or make changes to this bug.