fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

PeoplePicker: Focus will lost after delete a selected person with keyboard

Open MirandaGe opened this issue 9 years ago • 9 comments

Bug Report

  • Package version(s): (fill this out)
  • Browser and OS versions: (fill this out if relevant)

Describe the issue:

  1. select some people in PeoplePicker
  2. use direction key to select a selected person, make focus on the delete button.
  3. press enter to delete the person
  4. the next person will be high lighted, but if you continue using keyboard, it can't select person any more, the focus has gone to the page.

Expected behavior:

the focus will go to the next person.

MirandaGe avatar Jan 25 '17 23:01 MirandaGe

@joschect

I'm a bit surprised it's happening, I thought this worked. Will let Jon take a look, unless you beat him to it @MirandaGe .

dzearing avatar Jan 26 '17 00:01 dzearing

@MirandaGe what browser are you using? I see that it's working in chrome. There does appear to be a separate bug in IE where backspace causes the page to navigate.

joschect avatar Jan 26 '17 01:01 joschect

@MirandaGe I was not synced with the latest. I will look into this.

joschect avatar Jan 26 '17 01:01 joschect

@MirandaGe Okay, sorry to keep flip flopping, backspace appears to work properly in Chrome, but IE does navigate back to the previous page.

joschect avatar Jan 26 '17 02:01 joschect

I have been able to reproduce this if I have the ctrl key pressed while selecting, very interesting interaction.

joschect avatar Jan 26 '17 02:01 joschect

@dzearing it looks like there are times where an item can be selected and yet not selected. Basically the onSelectionChange is called and focus is given to the item, but when getSelectedCount() is called there is nothing selected.

joschect avatar Jan 26 '17 02:01 joschect

@dzearing Okay, so it seems like SelectionZone gives focus to the target and sets it as an anchor giving it the appearance of selection, but for all intents and purposes it's not selected. See the _onFocus method.

joschect avatar Jan 26 '17 03:01 joschect

Sorry for missing so much... I am on vacation and thank you for your quick reply. I test it use the example shown on demo page and seems it's not the newest version.

MirandaGe avatar Jan 26 '17 12:01 MirandaGe

@MirandaGe Since this isn't a problem in the latest version I'll close this issue. Please reopen it or open a new one if you experience this problem again.

joschect avatar Feb 01 '17 20:02 joschect