fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

CommandBar contextual Menu on dismiss eats up the focus event

Open AkshanshSrivastava03 opened this issue 9 years ago • 4 comments

Bug Report

  • Package version(s):^2.34.3-vsts.1
  • Browser and OS versions: All browsers

Priorities and help requested (not applicable if asking question):

Requested priority: (Blocking, High, Normal, Low)

Products/sites affected: (if applicable) VSTS

Describe the issue:

If there is a single button (disabled) in the overflow items (contextual menu) of the Command bar, and we open the Contextual menu then click on some button which is listening to focus events, it does not receive it as the _onContextMenuDismiss has event.stopPropagation and event.preventDefault which are eating up the focus event. The component trying to listen on focus does not receive the onFocus as it has been eaten up by Command Bar component

Actual behavior:

Command Bar eats up the focus event.

Expected behavior:

Command Bar should not eat up any event (like focus etc).

AkshanshSrivastava03 avatar Jun 13 '17 12:06 AkshanshSrivastava03

Is there any specific requirement why we eat up the event? As i see there is an If-check before stopping event propagation. Is there some scenario due to which we are avoiding it? Also, this issue only happens if there is a single button in overflow (contextual menu) in disabled state.

AkshanshSrivastava03 avatar Jun 13 '17 12:06 AkshanshSrivastava03

@dzearing I think we should not stop event propagation here. Also if event is null then as per code it will cause null reference exception. I was planning to remove this but once wants to confirm with you. Do you remember any reason why we are stopping the propagation here

aadhars avatar Jul 10 '17 18:07 aadhars

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions to Fabric React!

stale[bot] avatar Apr 11 '18 02:04 stale[bot]

This issue has been automatically closed because it has not had recent activity after being marked as stale. If you belive this issue is still a problem or should be reopened, please reopen it! Thank you for your contributions to Fabric React! Why am I receiving this notification?

stale[bot] avatar May 18 '18 23:05 stale[bot]