diff --git a/src/main/resources/META-INF/resources/primefaces/datatable/datatable.js b/src/main/resources/META-INF/resources/primefaces/datatable/datatable.js
index <HASH>..<HASH> 100644
--- a/src/main/resources/META-INF/resources/primefaces/datatable/datatable.js
+++ b/src/main/resources/META-INF/resources/primefaces/datatable/datatable.js
@@ -817,7 +817,7 @@ PrimeFaces.widget.DataTable = PrimeFaces.widget.DeferredWidget.extend({
             var row = $(this);
 
             if(targetWidget.cfg.selectionMode && row.hasClass('ui-datatable-selectable')) {
-                targetWidget.onRowRightClick(e, this, cfg.selectionMode);
+                targetWidget.onRowRightClick(e, this, targetWidget.cfg.selectionMode);
 
                 menuWidget.show(e);
             }
fix for PrimeFaces issue #<I>

Get selection mode value from widget (datatable) instead of from context menu.