【问题标题】:Input type text is not working in IE browser输入类型文本在 IE 浏览器中不起作用
【发布时间】:2016-01-27 05:23:22
【问题描述】:

我的项目我正在使用 Angular。 输入类型文本在 IE 浏览器中不起作用。 IE 11 和 IE 10。

问题 - onCLick on 输入框焦点来了,但输入框内的光标没有来。

HTML 代码:

                <tr ng-show="panel.procesChart && !emptyProcessTarget && headers.length>1">
                     <td></td>
                    <td style="padding-left: 0px;" ng-repeat="targetDet in panel.targets | limitTo:headers.length-1">
                        <input class="table-filter" type="text" ng-model='targetDet.filter'/>
                    </td>
                    <td>
                        <div class="filter-icon">
                            <div class="filter-icon-div" ng-click="get_data()" bs-tooltip="'Filter'" data-placement="bottom" data-original-title="" title=""></div>
                            <i class="fa fa-question-circle"></i>
                        </div>
                    </td>
                </tr>

我试着给:

$('.table-filter').on('mouse-down', function(){
      //return true;
      $(this).focus();
    });

但它仍然无法正常工作。 我做了一些调查,发现 IE 10 11 存在一些问题。

请建议我任何解决方案或技巧。 谢谢!!

【问题讨论】:

  • 我觉得这不适用于 angular ng-repeat 仅..
  • 您是否尝试过输入元素上的autofocus 属性,无论您想专注于字段吗?
  • 是的,我试过了..它不起作用..
  • 把它放在你的html页面的标签之前

标签: jquery html angularjs internet-explorer


【解决方案1】:

应该是mousedown,而不是mouse-down

$('.table-filter').on('mousedown', function(){
  //return true;
  $(this).focus();
});

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-07-16
  • 2011-02-04
  • 1970-01-01
  • 1970-01-01
  • 2012-09-09
  • 1970-01-01
相关资源
最近更新 更多