浏览代码

changed variablename and use include instead of the jquery inarray

Dustin Utecht 6 年之前
父节点
当前提交
664ad7ac10
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/extensions/mobile/bootstrap-table-mobile.js

+ 2 - 2
src/extensions/mobile/bootstrap-table-mobile.js

@@ -47,9 +47,9 @@ $.BootstrapTable = class extends $.BootstrapTable {
       // reset view if height has only changed by at least the threshold.
       const width = $(window).width()
       const height = $(window).height()
-      const activeElement = $(document.activeElement)
+      const $activeElement = $(document.activeElement)
 
-      if (activeElement && $.inArray(activeElement.prop('nodeName'), ['input', 'select', 'textarea'])) {
+      if ($activeElement.length && ['INPUT', 'SELECT', 'TEXTAREA'].includes($activeElement.prop('nodeName'))) {
         return
       }