Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic Focus
Message
 
 
General information
Forum:
Javascript
Category:
Other
Title:
Miscellaneous
Thread ID:
01604694
Message ID:
01605067
Views:
49
>>The problem is that on the form with several tabs (tabs are on the left side), the first time the form opens the control has the focus. When I start switching between tabs, other tabs first control doesn't have focus (despite having that directive set) and when I go back to the original first tab the control also doesn't have focus anymore. I am wondering if there is a way to fix that behavior.
>
>Not sure. I guess you could watch for click on the tab and reset focus there ?

Here is how the tabs are defined:
 <div class="col-lg-3 col-md-3 panel-container">
                        <ul class="nav nav-pills nav-stacked">
                            <li class="active"><a data-toggle="pill" href="#TaxRatesAndFees" ng-class="{true: 'invalid-tab', false: ''}[form.TaxRatesAndFees.$invalid]">Tax Rates and Fees</a></li>
                            <li><a data-toggle="pill" href="#SeasonSchedule1" ng-class="{true: 'invalid-tab', false: ''}[form.SeasonSchedule1.$invalid]">Season Schedule 1 Dates</a></li>
                            <li><a data-toggle="pill" href="#SeasonSchedule2" ng-class="{true: 'invalid-tab', false: ''}[form.SeasonSchedule2.$invalid]">Season Schedule 2 Dates</a></li>
                            <li><a data-toggle="pill" href="#SeasonSchedule3" ng-class="{true: 'invalid-tab', false: ''}[form.SeasonSchedule3.$invalid]">Season Schedule 3 Dates</a></li>
                            <li><a data-toggle="pill" href="#SeasonSchedule4" ng-class="{true: 'invalid-tab', false: ''}[form.SeasonSchedule4.$invalid]">Season Schedule 4 Dates</a></li>
                        </ul>
                    </div>
                    <div class="col-lg-9 col-md-9 panel-container">
                        <div class="tab-content">
                            <div class="tab-pane active" id="TaxRatesAndFees">
                                @Html.Partial("TaxRatesAndFees")
                            </div>
I am not sure what is nav-pills and what is data-toggle. What exactly is happening when we switch between tabs this way? Is there a way to hook to some event?

When I open the form the first time, the control is shown with a focus. However, when I start switching between tabs defined this way, there is no focus on the control with the sm-focus directive. It is a minor issue, but I am wondering how to make it work?

Thanks again.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform