@@ -212,17 +212,17 @@ function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $in
212212 /**
213213 * Finds the proper focus target by searching the DOM.
214214 *
215- * @param containerEl
216- * @param attributeVal
217- * @returns {* }
215+ * @param { !JQLite } containerEl
216+ * @param { string= } attributeVal
217+ * @returns {JQLite|undefined }
218218 */
219219 findFocusTarget : function ( containerEl , attributeVal ) {
220220 var AUTO_FOCUS = this . prefixer ( 'md-autofocus' , true ) ;
221221 var elToFocus ;
222222
223223 elToFocus = scanForFocusable ( containerEl , attributeVal || AUTO_FOCUS ) ;
224224
225- if ( ! elToFocus && attributeVal != AUTO_FOCUS ) {
225+ if ( ! elToFocus && attributeVal !== AUTO_FOCUS ) {
226226 // Scan for deprecated attribute
227227 elToFocus = scanForFocusable ( containerEl , this . prefixer ( 'md-auto-focus' , true ) ) ;
228228
@@ -237,12 +237,15 @@ function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $in
237237 /**
238238 * Can target and nested children for specified Selector (attribute)
239239 * whose value may be an expression that evaluates to True/False.
240+ * @param {!JQLite } target
241+ * @param {!string } selector
242+ * @return {JQLite|undefined }
240243 */
241244 function scanForFocusable ( target , selector ) {
242245 var elFound , items = target [ 0 ] . querySelectorAll ( selector ) ;
243246
244247 // Find the last child element with the focus attribute
245- if ( items && items . length ) {
248+ if ( items && items . length ) {
246249 items . length && angular . forEach ( items , function ( it ) {
247250 it = angular . element ( it ) ;
248251
@@ -258,8 +261,8 @@ function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $in
258261
259262 /**
260263 * Disables scroll around the passed parent element.
261- * @param {Element|angular. JQLite= } element Origin Element (not used)
262- * @param {Element|angular. JQLite= } parent Element to disable scrolling within.
264+ * @param {Element|JQLite= } element Origin Element (not used)
265+ * @param {Element|JQLite= } parent Element to disable scrolling within.
263266 * Defaults to body if none supplied.
264267 * @param {Object= } options Object of options to modify functionality
265268 * - disableScrollMask Boolean of whether or not to create a scroll mask element or
@@ -291,7 +294,7 @@ function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $in
291294 /**
292295 * Creates a virtual scrolling mask to prevent touchmove, keyboard, scrollbar clicking,
293296 * and wheel events.
294- * @param {!Element|!angular. JQLite } elementToDisable
297+ * @param {!Element|!JQLite } elementToDisable
295298 * @param {Object= } scrollMaskOptions Object of options to modify functionality
296299 * - disableScrollMask Boolean of whether or not to create a scroll mask element or
297300 * use the passed parent element.
@@ -387,15 +390,16 @@ function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $in
387390 tempNode . children ( ) . css ( 'height' , '60px' ) ;
388391
389392 $document [ 0 ] . body . appendChild ( tempNode [ 0 ] ) ;
390- this . floatingScrollbars . cached = ( tempNode [ 0 ] . offsetWidth == tempNode [ 0 ] . childNodes [ 0 ] . offsetWidth ) ;
393+ this . floatingScrollbars . cached =
394+ ( tempNode [ 0 ] . offsetWidth === tempNode [ 0 ] . childNodes [ 0 ] . offsetWidth ) ;
391395 tempNode . remove ( ) ;
392396 }
393397 return this . floatingScrollbars . cached ;
394398 } ,
395399
396400 /**
397401 * Mobile safari only allows you to set focus in click event listeners.
398- * @param {Element|angular. JQLite } element to focus
402+ * @param {Element|JQLite } element to focus
399403 */
400404 forceFocus : function ( element ) {
401405 var node = element [ 0 ] || element ;
0 commit comments