@@ -196,7 +196,11 @@ DynamicList.prototype.attachObservers = function() {
196
196
_this . hideFilterOverlay ( ) ;
197
197
_this . clearFilters ( ) ;
198
198
} )
199
- . on ( 'click' , '.hidden-filter-controls-filter' , function ( ) {
199
+ . on ( 'click keydown' , '.hidden-filter-controls-filter' , function ( event ) {
200
+ if ( ! _this . Utils . Event . isExecute ( event ) ) {
201
+ return ;
202
+ }
203
+
200
204
var $filter = $ ( this ) ;
201
205
202
206
Fliplet . Analytics . trackEvent ( {
@@ -275,7 +279,11 @@ DynamicList.prototype.attachObservers = function() {
275
279
276
280
_this . $container . find ( '.clear-filters' ) . removeClass ( 'hidden' ) ;
277
281
} )
278
- . on ( 'click' , '.list-search-cancel' , function ( ) {
282
+ . on ( 'click keydown' , '.list-search-cancel' , function ( event ) {
283
+ if ( ! _this . Utils . Event . isExecute ( event ) ) {
284
+ return ;
285
+ }
286
+
279
287
// Hide filters
280
288
$ ( this ) . removeClass ( 'active' ) ;
281
289
_this . $container . find ( '.hidden-filter-controls' ) . removeClass ( 'active' ) ;
@@ -349,12 +357,20 @@ DynamicList.prototype.attachObservers = function() {
349
357
_this . isSearching = true ;
350
358
_this . searchData ( value ) ;
351
359
} )
352
- . on ( 'click' , '.clear-search' , function ( ) {
360
+ . on ( 'click keydown' , '.clear-search' , function ( event ) {
361
+ if ( ! _this . Utils . Event . isExecute ( event ) ) {
362
+ return ;
363
+ }
364
+
353
365
_this . $container . find ( '.new-agenda-list-container' ) . removeClass ( 'searching' ) ;
354
366
_this . isSearching = false ;
355
367
_this . searchData ( '' ) ;
356
368
} )
357
- . on ( 'click' , '.go-to-poll' , function ( ) {
369
+ . on ( 'click keydown' , '.go-to-poll' , function ( event ) {
370
+ if ( ! _this . Utils . Event . isExecute ( event ) ) {
371
+ return ;
372
+ }
373
+
358
374
if ( ! _this . data . pollEnabled || ! _this . data . pollColumn ) {
359
375
return ;
360
376
}
@@ -369,7 +385,11 @@ DynamicList.prototype.attachObservers = function() {
369
385
entry : entry
370
386
} ) ;
371
387
} )
372
- . on ( 'click' , '.go-to-survey' , function ( ) {
388
+ . on ( 'click keydown' , '.go-to-survey' , function ( event ) {
389
+ if ( ! _this . Utils . Event . isExecute ( event ) ) {
390
+ return ;
391
+ }
392
+
373
393
if ( ! _this . data . surveyEnabled || ! _this . data . surveyColumn ) {
374
394
return ;
375
395
}
@@ -384,7 +404,11 @@ DynamicList.prototype.attachObservers = function() {
384
404
entry : entry
385
405
} ) ;
386
406
} )
387
- . on ( 'click' , '.go-to-questions' , function ( ) {
407
+ . on ( 'click keydown' , '.go-to-questions' , function ( event ) {
408
+ if ( ! _this . Utils . Event . isExecute ( event ) ) {
409
+ return ;
410
+ }
411
+
388
412
if ( ! _this . data . questionsEnabled || ! _this . data . questionsColumn ) {
389
413
return ;
390
414
}
@@ -425,9 +449,13 @@ DynamicList.prototype.attachObservers = function() {
425
449
: 'bookmarks_hide'
426
450
} ) ;
427
451
} )
428
- . on ( 'click' , '.toggle-agenda, .toggle-bookmarks' , function ( e ) {
452
+ . on ( 'click' , '.toggle-agenda, .toggle-bookmarks' , function ( event ) {
429
453
e . stopPropagation ( ) ;
430
454
455
+ if ( ! _this . Utils . Event . isExecute ( event ) ) {
456
+ return ;
457
+ }
458
+
431
459
var $toggle = _this . $container . find ( e . handleObj . selector ) ;
432
460
433
461
$toggle . toggleClass ( 'mixitup-control-active' ) ;
@@ -456,7 +484,11 @@ DynamicList.prototype.attachObservers = function() {
456
484
allowClick = true ;
457
485
} , 100 ) ;
458
486
} )
459
- . on ( 'click' , '.agenda-list-item' , function ( event ) {
487
+ . on ( 'click keydown' , '.agenda-list-item' , function ( event ) {
488
+ if ( ! _this . Utils . Event . isExecute ( event ) ) {
489
+ return ;
490
+ }
491
+
460
492
if ( _this . isPanning && ! _this . allowClick && $ ( this ) . hasClass ( 'open' ) ) {
461
493
return ;
462
494
}
@@ -506,7 +538,11 @@ DynamicList.prototype.attachObservers = function() {
506
538
} ) ;
507
539
} ) ;
508
540
} )
509
- . on ( 'click' , '.agenda-detail-overlay-close, .agenda-detail-overlay-screen' , function ( event ) {
541
+ . on ( 'click keydown' , '.agenda-detail-overlay-close, .agenda-detail-overlay-screen' , function ( event ) {
542
+ if ( ! _this . Utils . Event . isExecute ( event ) ) {
543
+ return ;
544
+ }
545
+
510
546
var result ;
511
547
512
548
if ( $ ( this ) . hasClass ( 'go-previous-screen' ) ) {
@@ -569,7 +605,11 @@ DynamicList.prototype.attachObservers = function() {
569
605
return ;
570
606
}
571
607
} )
572
- . on ( 'click' , '.agenda-date-selector li' , function ( ) {
608
+ . on ( 'click keydown' , '.agenda-date-selector li' , function ( event ) {
609
+ if ( ! _this . Utils . Event . isExecute ( event ) ) {
610
+ return ;
611
+ }
612
+
573
613
// prevents clicking the active one
574
614
// prevents clicking the placeholder
575
615
if ( $ ( this ) . hasClass ( 'active' ) || $ ( this ) . hasClass ( 'placeholder' ) ) {
@@ -598,7 +638,11 @@ DynamicList.prototype.attachObservers = function() {
598
638
return ;
599
639
}
600
640
} )
601
- . on ( 'click' , '.dynamic-list-add-item' , function ( ) {
641
+ . on ( 'click keydown' , '.dynamic-list-add-item' , function ( event ) {
642
+ if ( ! _this . Utils . Event . isExecute ( event ) ) {
643
+ return ;
644
+ }
645
+
602
646
if ( ! _this . data . addEntryLinkAction ) {
603
647
return ;
604
648
}
@@ -630,7 +674,11 @@ DynamicList.prototype.attachObservers = function() {
630
674
} ) ;
631
675
}
632
676
} )
633
- . on ( 'click' , '.dynamic-list-edit-item' , function ( ) {
677
+ . on ( 'click keydown' , '.dynamic-list-edit-item' , function ( event ) {
678
+ if ( ! _this . Utils . Event . isExecute ( event ) ) {
679
+ return ;
680
+ }
681
+
634
682
if ( ! _this . data . editEntryLinkAction ) {
635
683
return ;
636
684
}
@@ -664,7 +712,11 @@ DynamicList.prototype.attachObservers = function() {
664
712
} ) ;
665
713
}
666
714
} )
667
- . on ( 'click' , '.dynamic-list-delete-item' , function ( ) {
715
+ . on ( 'click keydown' , '.dynamic-list-delete-item' , function ( event ) {
716
+ if ( ! _this . Utils . Event . isExecute ( event ) ) {
717
+ return ;
718
+ }
719
+
668
720
var _that = $ ( this ) ;
669
721
var entryID = $ ( this ) . parents ( '.agenda-item-inner-content' ) . data ( 'entry-id' ) ;
670
722
var options = {
@@ -726,7 +778,11 @@ DynamicList.prototype.attachObservers = function() {
726
778
Fliplet . UI . Actions ( options ) ;
727
779
} ) ;
728
780
} )
729
- . on ( 'click' , '.agenda-detail-overlay .bookmark-wrapper, .search-results-wrapper .bookmark-wrapper' , function ( ) {
781
+ . on ( 'click keydown' , '.agenda-detail-overlay .bookmark-wrapper, .search-results-wrapper .bookmark-wrapper' , function ( event ) {
782
+ if ( ! _this . Utils . Event . isExecute ( event ) ) {
783
+ return ;
784
+ }
785
+
730
786
var id = $ ( this ) . parents ( '.agenda-detail-wrapper, .agenda-list-item' ) . data ( 'entry-id' ) ;
731
787
var record = _ . find ( _this . listItems , { id : id } ) ;
732
788
0 commit comments