Comparing version 1.0.3 to 1.1.0
@@ -35,19 +35,3 @@ /*! Copyright (c) 2016 Ayogo Health Inc. | ||
// Courtesy of AngularUI Bootstrap's $modal service | ||
var FOCUS_SELECTOR = [ | ||
'a[href]', | ||
'area[href]', | ||
'input:not([disabled])', | ||
'button:not([disabled])', | ||
'select:not([disabled])', | ||
'textarea:not([disabled])', | ||
'keygen:not([disabled])', | ||
'iframe', | ||
'object', | ||
'embed', | ||
'[tabindex]:not([disabled]):not([tabindex=""])', | ||
'[contenteditable=true]' | ||
].join(','); | ||
var DIALOG_STYLES = [ | ||
@@ -79,2 +63,6 @@ '[hidden] {', | ||
'', | ||
'dialog:focus {', | ||
' outline: 0 none;', | ||
'}', | ||
'', | ||
'dialog[open] {', | ||
@@ -129,17 +117,2 @@ ' visibility: visible;', | ||
var control = el.querySelector(FOCUS_SELECTOR); | ||
if (control) { | ||
if (immediate) { | ||
control.focus(); | ||
return; | ||
} | ||
$window.setTimeout(function() { | ||
control.focus(); | ||
}, 1); | ||
el.focus(); | ||
return; | ||
} | ||
el.focus(); | ||
@@ -318,3 +291,8 @@ } | ||
// Ensure the dialog is focusable | ||
if (!el.hasAttribute('tabindex')) { | ||
el.tabIndex = -1; | ||
} | ||
if (('HTMLDialogElement' in $window) && | ||
@@ -321,0 +299,0 @@ (el instanceof $window.HTMLDialogElement)) |
{ | ||
"name": "ay-dialog", | ||
"version": "1.0.3", | ||
"version": "1.1.0", | ||
"copyright": "Copyright 2016 Ayogo Health Inc.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26312
546