CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

"Focus Border" appears on region withTabStop = False

by MCarver » 10 Jul 2018 15:15

CG Gurus:

Even though I have set the
myCGRegion.TabStop := False;
myCGRegion.TabIndex := False;
A “focus border” appears around the region whenever a user clicks on it. Stripping that "tabindex" style from the rendered html avoids this behavior.

Shouldn't these properties (namely TabStop) automatically strip the "tabindex" style from the cgregion.

Please advise as I would rather avoid the extra code to strip this style.

Regards,
Monte Carver
MCarver
 
Posts: 48
Joined: 27 Sep 2013 19:15

by Alexander Bulei » 17 Jul 2018 09:15

Hi MCarver,

I don't see that behavior..
Pleae provide the steps or the simple testcase.
Tia.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by MCarver » 17 Jul 2018 17:05

Alexander,

Thank you for the prompt attention.

This is the rendered DIV of the CGRegion, where
TabIndex := False
TabStop := False

<div class="ui-widget ui-widget-content" id="REGHEADER" style="" tabindex="-1"

As mentioned, this resulting tabindex renders a blue border in chrome when selected. Stripping the tabindex removes the border. I had expected that setting the TabIndex := False to do this automatically.

Reviewing CG's source in the unit IWCGJQRegions.pas
Line 720
Code: Select all
if NOT TabStop then
    Result.AddIntegerParam('tabindex',-1)


Changing it to read the following strips the tabindex as expected.

Code: Select all
if TabStop then
    Result.AddIntegerParam('tabindex',-1)


Is this not a bug? Why is it adding a "tabindex" when TabStop = FALSE?

Please advise.
Thank you for your attention on this matter.

Regards,
Monte Carver
MCarver
 
Posts: 48
Joined: 27 Sep 2013 19:15

by Alexander Bulei » 19 Jul 2018 14:09

Hi MCarver,

Is this not a bug? Why is it adding a "tabindex" when TabStop = FALSE?


No, its not. It's OK with tabindex.

Just define the custom css style to remove that border :

css code
*:focus {outline:none !important}


It's a default behavior of cchrome browser.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal


Return to JQRegion

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.