function trapTabs(parentElement) {
		if (parentElement.tabTrapInstalled)
			return;
		
		parentElement.addEventListener("keydown", function (e) { //$NON-NLS-0$
			if(e.keyCode === KEY.TAB) {
				var first = firstTabbable(parentElement);
				var last = lastTabbable(parentElement);
				
				if (first && last) {
					if (e.target === last && !e.shiftKey) {
						// wrap to first tabbable
						first.focus();
						stop(e);
					}
					else if (e.target === first && e.shiftKey) {
						// wrap to last tabbable
						last.focus();
						stop(e);
					}
				}
			} 
		}, true);
		parentElement.tabTrapInstalled = true;
	}
/* Trap the tabs within the given parent */
Trap the tabs within the given parent
Trap the tabs within the given parent
function trapTabs(parentElement) {
		if (parentElement.tabTrapInstalled)
			return;
		parentElement.addEventListener("keydown", function (e) { 
			if(e.keyCode === KEY.TAB) {
				var first = firstTabbable(parentElement);
				var last = lastTabbable(parentElement);
				if (first && last) {
					if (e.target === last && !e.shiftKey) {
						first.focus();
						stop(e);
					}
					else if (e.target === first && e.shiftKey) {
						last.focus();
						stop(e);
					}
				}
			} 
		}, true);
		parentElement.tabTrapInstalled = true;
	}
function trapTabs ( parentElement ) { if ( parentElement . tabTrapInstalled ) return ; parentElement . addEventListener ( "keydown" , function ( e ) { if ( e . keyCode === KEY . TAB ) { var first = firstTabbable ( parentElement ) ; var last = lastTabbable ( parentElement ) ; if ( first && last ) { if ( e . target === last && ! e . shiftKey ) { first . focus ( ) ; stop ( e ) ; } else if ( e . target === first && e . shiftKey ) { last . focus ( ) ; stop ( e ) ; } } } } , true ) ; parentElement . tabTrapInstalled = true ; }
Trap the tabs within the given parent
Trap the tabs within the given parent
//$NON-NLS-0$
 // wrap to first tabbable
 // wrap to last tabbable
