Bugzilla – Attachment 146266 Details for
Bug 108687
Form option buttons and other form fields not reachable with tab key
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
radioTabStop.diff: slightly hacky fix with debug
radioTabStop.diff (text/plain), 2.93 KB, created by
Justin L
on 2018-11-03 13:02:23 UTC
(
hide
)
Description:
radioTabStop.diff: slightly hacky fix with debug
Filename:
MIME Type:
Creator:
Justin L
Created:
2018-11-03 13:02:23 UTC
Size:
2.93 KB
patch
obsolete
>diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx >index d9bcc5928ecb..9968f2f38b9b 100644 >--- a/toolkit/source/controls/stdtabcontroller.cxx >+++ b/toolkit/source/controls/stdtabcontroller.cxx >@@ -25,6 +25,7 @@ > #include <toolkit/controls/stdtabcontrollermodel.hxx> > #include <toolkit/awt/vclxwindow.hxx> > #include <toolkit/helper/macros.hxx> >+#include <toolkit/helper/vclunohelper.hxx> > #include <cppuhelper/supportsservice.hxx> > #include <cppuhelper/typeprovider.hxx> > #include <cppuhelper/queryinterface.hxx> >@@ -340,6 +341,7 @@ void StdTabController::activateTabOrder( ) > { > mxModel->getGroup( nG, aThisGroupModels, aName ); > >+SAL_DEBUG("["<<nG<<"]of["<<nGroups<<"]::ActiveTabOrder group["<<aName<<"]"); > aControls = xTabController->getControls(); > // ImplCreateComponentSequence has a really strange semantics regarding it's first parameter: > // upon method entry, it expects a super set of the controls which it returns >@@ -349,6 +351,25 @@ void StdTabController::activateTabOrder( ) > aControlComponents.realloc( 0 ); > > ImplCreateComponentSequence( aControls, aThisGroupModels, aControlComponents, nullptr, true ); >+ >+ //Ensure that at least one in the group is a tabstop >+ for ( sal_uInt32 j=aControlComponents.getLength(); j > 0; --j ) >+ { >+ VclPtr<vcl::Window> pWin = VCLUnoHelper::GetWindow( aControlComponents[j-1] ); >+ if ( pWin && pWin->GetType() == WindowType::RADIOBUTTON ) >+ { >+ WinBits nStyle = pWin->GetStyle(); >+SAL_DEBUG("---["<<j<<"]of["<<aControlComponents.getLength()<<"] tabStop?["<<bool(nStyle & WB_TABSTOP)<<"] type["<<(int)pWin->GetType()<<"]RADIO["<<(int)WindowType::RADIOBUTTON<<"]"); >+ if ( j == 1 && !(nStyle & WB_NOTABSTOP) ) >+ { >+ pWin->SetStyle( nStyle | WB_TABSTOP ); >+ break; >+ } >+ if ( pWin->GetStyle() & WB_TABSTOP ) >+ break; >+ } >+ } >+ > xVclContainerPeer->setGroup( aControlComponents ); > } > } >diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx >index d81565a68666..26cff12f1a2d 100644 >--- a/vcl/source/control/button.cxx >+++ b/vcl/source/control/button.cxx >@@ -1855,9 +1855,11 @@ WinBits RadioButton::ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nSty > nStyle |= WB_GROUP; > if ( !(nStyle & WB_NOTABSTOP) ) > { >+SAL_DEBUG("ImplInitStyle forces radio button tabstop off unless checked["<<IsChecked()<<"] group?["<<(nStyle & WB_GROUP)<<"] request?["<<bool(nStyle & WB_TABSTOP)<<"]"); > if ( IsChecked() ) > nStyle |= WB_TABSTOP; >- else >+ // Allow TABSTOP for first radio button - otherwise the group might be skipped over if none are checked. >+ else if ( !(nStyle & WB_GROUP) ) > nStyle &= ~WB_TABSTOP; > } > return nStyle;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 108687
:
134402
| 146266 |
155798