Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "Prevent SelectionZone from interfering with links and buttons",
"type": "patch"
}
],
"packageName": "office-ui-fabric-react",
"email": "tmichon@microsoft.com"
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export class DetailsListAdvancedExample extends React.Component<{}, IDetailsList
selectionMode={ selectionMode }
constrainMode={ constrainMode }
groupProps={ groupProps }
enterModalSelectionOnTouch={ true }
onItemInvoked={ this._onItemInvoked }
onItemContextMenu={ this._onItemContextMenu }
ariaLabelForListHeader='Column headers. Use menus to perform column operations like sort and filter'
Expand Down Expand Up @@ -602,7 +603,7 @@ export class DetailsListAdvancedExample extends React.Component<{}, IDetailsList
} else if (column.key === 'key') {
column.columnActionsMode = ColumnActionsMode.disabled;
column.onRender = (item) => (
<Link href='#'>{ item.key }</Link>
<Link href='https://microsoft.com' target='_blank' rel='noopener'>{ item.key }</Link>
);
column.minWidth = 90;
column.maxWidth = 90;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ export class SelectionZone extends BaseComponent<ISelectionZoneProps, {}> {
} else if (target === itemRoot && !this._isShiftPressed && !this._isCtrlPressed) {
this._onInvokeMouseDown(ev, this._getItemIndex(itemRoot));
break;
} else if (target.tagName === 'A' || target.tagName === 'BUTTON' || target.tagName === 'INPUT') {
return;
}
}

Expand Down Expand Up @@ -238,6 +240,8 @@ export class SelectionZone extends BaseComponent<ISelectionZoneProps, {}> {
} else if (target === itemRoot) {
this._onItemSurfaceClick(ev, index);
break;
} else if (target.tagName === 'A' || target.tagName === 'BUTTON' || target.tagName === 'INPUT') {
return;
}
}

Expand Down