code: function ItemEventsHandler_toggleItemSelection(itemIndex) {
                      var site = this._site,
                          selection = site.selection,
                          selected = selection._isIncluded(itemIndex);
  
                      if (site.selectionMode === _UI.SelectionMode.single) {
                          if (!selected) {
                              selection.set(itemIndex);
                          } else {
                              selection.clear();
                          }
                      } else {
                          if (!selected) {
                              selection.add(itemIndex);
                          } else {
                              selection.remove(itemIndex);
                          }
                      }
                  }
docs: In single selection mode, in addition to itemIndex's selection state being toggled, all other items will become deselected