Browse Source

changed variablename and use include instead of the jquery inarray

Dustin Utecht 6 years ago
parent
commit
664ad7ac10
1 changed files with 2 additions and 2 deletions
  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
       }