DesktopPagePanel shows focus ring on launch

I’m having a problem where the PagePanel is showing a blue focus ring on launch, and I do not want it to.

I can’t see any way to clear this without clicking outside of the pagepanel area.

Little help?

Could you send us a screenshot?

Please share the operating system you’re using.

developing on MacOS

There will be nothing magic in a screen shot - it’s just the outline from Allow Focus Ring.

I don‘t see it

Check if you accidentally activated an accessibility option. There is none that would fit the bit that I know about, though. Perhaps something with tabs? Once upon a time a cat activated an option to speak what is under the pointer.

May a Canvas with activated “Allow Focus” is involved? Can you strip down to a little project showing this and provide it?

I do have the same issue on one of my panel but did not find the solution yet

May a little sample project?

Even with the Full Keyboard Access accessibility setting on I can’t seem to force a PagePanel to have a focus ring. A TabPanel I can get the tabs to get focus rings, but not the content area.

demo project.xojo_xml_project (3.6 KB)
macOS 15.7.5 ARM
Xojo 2026r2.1

I thought this was an open and shut case but I’m sorry, Chris, I would need a sample project to reproduce the issue.

I agree that we probably need a sample project to track this down, otherwise we’re just guessing. Still, here’s my guess: do you have a SearchField on the pane or the window? I’m pretty sure I had a focus ring issue last year, when there was a SearchField control in the app.

1 Like

This actually did happen seemingly randomly in one of my applications.
I couldn’t find a pure Xojo solution, but this fixed it in the Open event:

Var nsv As NSViewMBS = me.NSViewMBS

If nsv <> Nil Then
  nsv.FocusRingType = NSViewMBS.NSFocusRingTypeNone
End If

I still have no idea what caused it to appear in the first place though.

1 Like

Oh, yes, I remember having fun with that, too.

Well to make it more fun, I can’t replicate it in a simple project now….. Grrr.

Is your DesktopPagePanel a base class or does it inherit from a super class that might be performing some behind-the-scene shenanigans?

I’ll verify.

The workaround was to set focus on a contained text field.

Does this prevent to get the focus wrong, again? If the user cycles thru with Tab Key.

I can’t get it to show again after it’s dismissed.

I did some digging into my memory and my code. When the window has a search field and a listbox/NSTableview then there is fun:

And yes, the focusring is inside the NSTableview.

I had to come up with some really funky code for the focusring of the NSTableView to get rid of it:

dim isCompatibilityMode as Boolean = OSUtils.getCompatibilityMode
'whatever
if SystemInformationMBS.isTahoe and isCompatibilityMode and XojoVersion >= 2025.03 then
  Return True
else
  Return False
end if
1 Like

Thanks, everyone, for the input.
I’m still unable to replicate this in a simple project.
I’m dissatisfied with my workaround, so I’ll keep digging in and I’ll share if I ever resolve it.