Open Bug 264820 Opened 20 years ago Updated 2 years ago

Focus outline stays when div dynamically changes from overflow:auto, to overflow:visible

Categories

(Core :: Layout, defect)

x86
Windows XP
defect

Tracking

()

REOPENED

People

(Reporter: martijn.martijn, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: testcase)

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a5) Gecko/20041017 Firefox/0.9.1+ Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a5) Gecko/20041017 Firefox/0.9.1+ See upcoming testcase. This testcase has an alternative stylesheet. This alternative stylesheet sets the <div> to overflow:visible, which is by default overflow:auto (in this case). When you have focused that div before you change to the overflow_visible stylesheet, you still get to see the focus outline on the div. I don't think that should be happening, because overflow:visible <div>'s are not focusable by default. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Attached file Testcase
Keywords: testcase
Hmm, also with something like this you should probably not be able to focus the <div>, I think: <html><head><style> div{overflow:auto;} div:focus{overflow:visible;} </style> </head> <body> <div>You should not be able to focus this div</div> </body> </html> </body></html>
Attached file dhtml testcase
A dthml testcase which focuses a div and then removes the tabindex attribute. The div should then lose it's focus outline, but that doesn't happen currently.
aaron, could you check this out?
This bug is interesting, but seems minor. The bigger picture is that we need to protect against anything that makes something no longer focusable. For example, a form control that becomes disabled, hidden or destroyed.
Blocks: 285581
Blocks: 289402
Blocks: 433692
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: