Compare commits

..

3 Commits

Author SHA1 Message Date
Christopher S. Case 2cfc3130c3 Merge pull request #68 from kerryj89/patch-1
Fix keyboard navigation in dropdown
2022-05-06 08:47:28 -05:00
Kerry Johnson ab74c547c4 Fix keyboard navigation in dropdown: Uncaught TypeError: Cannot read properties of undefined (reading 'focus')
The previous change assumed jQuery was in use (angular.element uses jQuery Lite by default which does NOT support class names with .find() -  https://docs.angularjs.org/api/ng/function/angular.element).  This change works without wrapping angular.element() around the selectors but I did it to keep it AngularJS-ish (don't really know if there are benefits to making it into a jqLite or jQuery object again).
2022-05-05 19:23:58 -05:00
Christopher S. Case 0c839cb8b5 chore(release): v3.0.7 2020-11-19 09:26:24 -06:00
3 changed files with 9 additions and 4 deletions
+5
View File
@@ -1,3 +1,8 @@
<a name="3.0.7"></a>
## [3.0.7](https://github.com/morgul/ui-bootstrap4/compare/v3.0.5...v3.0.7) (2020-11-19)
<a name="3.0.6"></a>
## [3.0.6](https://github.com/morgul/ui-bootstrap4/compare/v3.0.5...v3.0.6) (2018-12-04)
+2 -2
View File
@@ -1,7 +1,7 @@
{
"author": "https://github.com/morgul/ui-bootstrap4/graphs/contributors",
"name": "ui-bootstrap4",
"version": "3.0.6",
"version": "3.0.7",
"description": "Native AngularJS (Angular) directives for Bootstrap",
"homepage": "http://morgul.github.io/ui-bootstrap4/",
"keywords": [
@@ -25,7 +25,7 @@
"serve": "static dist -p 3857 -a 0.0.0.0 -H '{\"Cache-Control\": \"no-cache, must-revalidate\"}'",
"demo": "grunt html2js after-test && static dist -p 3857 -a 0.0.0.0 -H '{\"Cache-Control\": \"no-cache, must-revalidate\"}'",
"test": "grunt",
"release": "grunt release --"
"grunt": "grunt --"
},
"repository": {
"type": "git",
+2 -2
View File
@@ -194,8 +194,8 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.
scope.focusDropdownEntry = function(keyCode) {
var elems = self.dropdownMenu ? //If append to body is used.
angular.element(self.dropdownMenu).find('.dropdown-item') :
$element.find('div').eq(0).find('a.');
angular.element(self.dropdownMenu[0].querySelectorAll('.dropdown-item')) :
angular.element($element[0].querySelectorAll('div .dropdown-item'));
switch (keyCode) {
case 40: {