mirror of
https://github.com/makeplane/plane.git
synced 2026-07-13 22:09:12 +02:00
Merge branch 'sync/ce-ee' of github.com:makeplane/plane-ee into sync/ce-ee
This commit is contained in:
@@ -12,7 +12,7 @@ type TUseDropdownKeyDown = {
|
||||
export const useDropdownKeyDown: TUseDropdownKeyDown = (onOpen, onClose, isOpen, selectActiveItem?) => {
|
||||
const handleKeyDown = useCallback(
|
||||
(event: React.KeyboardEvent<HTMLElement>) => {
|
||||
if (event.key === "Enter") {
|
||||
if (event.key === "Enter" && !event.nativeEvent.isComposing) {
|
||||
if (!isOpen) {
|
||||
event.stopPropagation();
|
||||
onOpen();
|
||||
|
||||
@@ -99,7 +99,7 @@ export const IssueLabelSelect: React.FC<IIssueLabelSelect> = observer((props) =>
|
||||
setQuery("");
|
||||
}
|
||||
|
||||
if (query !== "" && e.key === "Enter" && canCreateLabel) {
|
||||
if (query !== "" && e.key === "Enter" && !e.nativeEvent.isComposing && canCreateLabel) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
await handleAddLabel(query);
|
||||
|
||||
@@ -158,7 +158,7 @@ export const LabelDropdown = (props: ILabelDropdownProps) => {
|
||||
setQuery("");
|
||||
}
|
||||
|
||||
if (query !== "" && e.key === "Enter" && canCreateLabel) {
|
||||
if (query !== "" && e.key === "Enter" && !e.nativeEvent.isComposing && canCreateLabel) {
|
||||
e.preventDefault();
|
||||
await handleAddLabel(query);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ export const useDropdownKeyDown: TUseDropdownKeyDown = (onEnterKeyDown, onEscKey
|
||||
|
||||
const handleKeyDown = useCallback(
|
||||
(event: React.KeyboardEvent<HTMLElement>) => {
|
||||
if (event.key === "Enter") {
|
||||
if (event.key === "Enter" && !event.nativeEvent.isComposing) {
|
||||
stopEventPropagation(event);
|
||||
onEnterKeyDown();
|
||||
} else if (event.key === "Escape") {
|
||||
|
||||
Reference in New Issue
Block a user