1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-20 16:07:45 +01:00

Fix initListSectionItemListeners (#355)

This commit is contained in:
Oscar Hinton 2017-11-03 22:21:07 +01:00 committed by Kyle Spearrin
parent 8ae178aff3
commit 45a269a5f0

View File

@ -204,7 +204,7 @@ export default class UtilsService {
throw new Error('doc parameter required'); throw new Error('doc parameter required');
} }
doc.on('click', '.list-section-item', (e: JQuery.Event) => { doc.on('click', '.list-section-item', function(e: JQuery.Event) {
if (e.isDefaultPrevented && e.isDefaultPrevented.name === 'returnTrue') { if (e.isDefaultPrevented && e.isDefaultPrevented.name === 'returnTrue') {
return; return;
} }
@ -241,11 +241,12 @@ export default class UtilsService {
doc.on( doc.on(
'focus', 'focus',
'.list-section-item input, .list-section-item select, .list-section-item textarea', '.list-section-item input, .list-section-item select, .list-section-item textarea',
(e: Event) => { function(e: Event) {
$(this).parent().addClass('active'); $(this).parent().addClass('active');
}); });
doc.on( doc.on(
'blur', '.list-section-item input, .list-section-item select, .list-section-item textarea', (e: Event) => { 'blur', '.list-section-item input, .list-section-item select, .list-section-item textarea',
function(e: Event) {
$(this).parent().removeClass('active'); $(this).parent().removeClass('active');
}); });
} }