Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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,10 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "PeoplePicker: Adding vertical-align styles and horizontal only keyboarding to the member list people picker focus zone.",
"type": "patch"
}
],
"email": "v-krbrow@microsoft.com"
}
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@ export class BasePickerListBelow<T, P extends IBasePickerProps<T>> extends BaseP
{ this.renderSuggestions() }
<FocusZone ref={ this._resolveRef('focusZone') }
className='ms-BasePicker-selectedItems'
isInnerZoneKeystroke={ this._isFocusZoneInnerKeystroke } >
isInnerZoneKeystroke={ this._isFocusZoneInnerKeystroke }
direction={ FocusZoneDirection.horizontal } >

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

David mentioned that we really shouldn't be setting this to be just horizontal. If we need to fix alignment or something like that then we should do that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that is the case I can back this portion out, however there are a couple issues that will need attention if we don't switch this to horizontal:

  1. Even with Edge's alignment issues fixed, the underlying issue still makes some of the elements unfocusable.
  2. In all browsers, keyboarding is completely broken in the example custom document picker on the Pickers component page. Only the first selected document is focusable and none of the internal elements can be selected.

Switching to horizontal remedies both of these problems, but at the expense of the up and down keys. So it may be a cleaner, more permanent solution to address these two issues separately instead of using horizontal here. My suspicion is that issue 1 is an Edge bug and issue 2 may be a problem with that specific picker implementation.

{ this.renderItems() }
</FocusZone>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@

.itemContainer {
display: inline-block;
vertical-align: top;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really necessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is in Edge. Without it, items can get out of alignment as you keyboard through them.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it is!!! any time you inline-block, you should strongly, strongly consider setting vertical alignment. Otherwise the browser will shuffle the div around trying to align its containing text with other text.

}