ng-disabled弄乱了tabbing

时间:2013-08-19 15:17:53

标签: javascript angularjs

所以我有这个奇怪的问题与ng-disabled可能别人可以看看?过度拱起的问题是,当搜索框获得焦点时,我无法再将大部分可列表元素聚焦在模态上,甚至是关闭模态的“X”。搜索框包含在helpSearchTermsDiv div中。一旦它获得焦点,我只能通过其父div helpPopupHeader中的可聚焦元素进行制表。我有一个modal(jquery ui),它包含以下指令:

helpModule.directive("helpDialog", ['helpService', '$timeout', 'translationService', function (helpService, $timeout, translationService) {
    return {
        replace: true,
        restrict: 'A',
        scope: {
            hc: '=helpHc',
            staticsBaseUrl: '@'
        },
        template: ' <div id="help-dialog">' +
                '       <div id="helpPopup" style="height:100%" class="help-dialog-contents-container">' +
                '           <div id="helpPopupHeader" class="help-popup-header help-header">' +
                '               <div id="helpPanelIconsDiv" class="help-panel-icons-div">' +
                '                   <button type="button" class="help-icon-small-back help-icon-small" ng-click="hc.back()" ng-disabled="!hc.canBack()" title="' + translationService.getMessage('SHOW_PREVIOUS') + '"></button>' +
                '                   <button type="button" class="help-icon-small-next help-icon-small" ng-click="hc.next()" ng-disabled="!hc.canNext()" title="' + translationService.getMessage('SHOW_NEXT') + '"></button>' +
                '                   <a class="help-toc-link" ng-click="helpToc()">'+translationService.getMessage("CONTENTS")+'</a>' +
                '                   <a class="help-index-link" ng-click="ctrl.helpIndex()">'+translationService.getMessage("INDEX")+'</a>' +
                '               </div>' +
                '               <div id="helpSearchTermsDiv" class="help-search-terms-div">' +
                '                   <input id="helpSearchTerms" ng-model="helpSearchTerms" title="{{searchHint}}" name="helpSearchTerms" ui-keyup="{\'enter\':\'helpSearch($event)\'}" ng-class="fieldClasses()" type="text" maxlength="50"/>' +
                '                   <button type="button" id="helpsubmitSearch" ng-disabled="searchHint == helpSearchTerms" class="help-search-button" title="' + translationService.getMessage('SEARCH_SUBMIT') + '" ng-click="helpSearch($event)"></button>' +
                '               </div>' +
                '           </div>' +
                '           <div id="help-popup-content" class="help-popup-panels">' +
                ....

如果我从helpsubmitSearch按钮中删除了ng-disabled,我可以选中模式中的所有tabbable元素。此外,如果我点击模态(因此搜索框失去焦点),我可以浏览所有元素,直到我回到搜索框,并且只能通过helpPopupHeader div进行制表。知道为什么会这样或者我可以尝试的东西吗?

0 个答案:

没有答案
相关问题