New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

angular-strap

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-strap - npm Package Compare versions

Comparing version 2.3.10 to 2.3.11

.tmp/angular-strap.tpl.js

2

bower.json
{
"name": "angular-strap",
"description": "AngularStrap - AngularJS directives for Bootstrap",
"version": "2.3.10",
"version": "2.3.11",
"keywords": [

@@ -6,0 +6,0 @@ "angular",

{
"name": "angular-strap",
"description": "AngularStrap - AngularJS directives for Bootstrap",
"version": "2.3.10",
"version": "2.3.11",
"keywords": [

@@ -9,3 +9,3 @@ "angular",

],
"main": "dist/angular-strap.js",
"main": "index.js",
"homepage": "http://mgcrea.github.io/angular-strap",

@@ -12,0 +12,0 @@ "bugs": "https://github.com/mgcrea/angular-strap/issues",

@@ -75,3 +75,4 @@ 'use strict';

scope.$select = function (date) {
scope.$select = function (date, disabled) {
if (disabled) return;
$datepicker.select(date);

@@ -78,0 +79,0 @@ };

@@ -82,4 +82,4 @@ 'use strict';

var controllerAs = options.controllerAs;
var resolve = angular.copy(options.resolve || {});
var locals = angular.copy(options.locals || {});
var resolve = options.resolve || {};
var locals = options.locals || {};
var transformTemplate = options.transformTemplate || angular.identity;

@@ -86,0 +86,0 @@ var bindToController = options.bindToController;

@@ -298,8 +298,10 @@ 'use strict';

// Support v1.2+ $animate
// https://github.com/angular/angular.js/issues/11713
if (angular.version.minor <= 2) {
$animate.leave(tipElement, leaveAnimateCallback);
} else {
$animate.leave(tipElement).then(leaveAnimateCallback);
if (tipElement !== null) {
// Support v1.2+ $animate
// https://github.com/angular/angular.js/issues/11713
if (angular.version.minor <= 2) {
$animate.leave(tipElement, leaveAnimateCallback);
} else {
$animate.leave(tipElement).then(leaveAnimateCallback);
}
}

@@ -306,0 +308,0 @@

@@ -774,5 +774,36 @@ 'use strict';

});
xdescribe('keydown', function() {
it('should not update the typeahead scrollTop', function() {
var elm = compileDirective('default'), container;
angular.element(elm[0]).triggerHandler('focus');
elm.val(scope.states[0].substr(0, 1));
triggerKeyDown (elm, 40);
$animate.flush();
container = sandboxEl.find('.dropdown-menu')[0];
expect(container.scrollTop).toBe(0);
});
it('should update the typeahead containers scrollTop property', function() {
var elm = compileDirective('default'), container;
angular.element(elm[0]).triggerHandler('focus');
elm.val('r');
angular.element(elm[0]).triggerHandler('input');
$animate.flush();
triggerKeyDown (elm, 40);
triggerKeyDown (elm, 40);
triggerKeyDown (elm, 40);
triggerKeyDown (elm, 40);
triggerKeyDown (elm, 40);
container = sandboxEl.find('.typeahead.dropdown-menu')[0];
expect(container.scrollTop).toBe(container.clientHeight);
});
});
});

@@ -118,2 +118,20 @@ 'use strict';

$typeahead.$$updateScrollTop = function (container, index) {
if (index > -1 && index < container.children.length) {
var active = container.children[index];
var clientTop = active.offsetTop;
var clientBottom = active.offsetTop + active.clientHeight;
var highWatermark = container.scrollTop;
var lowWatermark = container.scrollTop + container.clientHeight;
// active entry overlaps top border
if (clientBottom >= highWatermark && clientTop < highWatermark) {
container.scrollTop = Math.max(0, container.scrollTop - container.clientHeight);
} else if (clientBottom > lowWatermark) {
// top of active element is invisible because it's below the bottom of the visible container window
container.scrollTop = clientTop;
}
}
};
$typeahead.$onKeyDown = function (evt) {

@@ -139,2 +157,5 @@ if (!/(38|40|13)/.test(evt.keyCode)) return;

}
// update scrollTop property on $typeahead when scope.$activeIndex is not in visible area
$typeahead.$$updateScrollTop($typeahead.$element[0], scope.$activeIndex);
scope.$digest();

@@ -141,0 +162,0 @@ };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc