File tree Expand file tree Collapse file tree 2 files changed +19
-18
lines changed
Expand file tree Collapse file tree 2 files changed +19
-18
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import Pencil from "../icons/pencil.svg";
2424import { ITEM_HOVER_MENU_CLASS_NAME , ItemHoverMenu } from "./itemHoverMenu" ;
2525import { EditItem } from "./editItem" ;
2626import { Reply } from "./reply" ;
27+ import { IMAGING_REQUEST_ITEM_TYPE } from "shared/octopusImaging" ;
2728
2829interface ItemDisplayProps {
2930 item : Item | PendingItem ;
@@ -95,6 +96,7 @@ export const ItemDisplay = ({
9596 ! maybeEditingItemId &&
9697 item . userEmail === userEmail &&
9798 item . type !== "claim" &&
99+ item . type !== IMAGING_REQUEST_ITEM_TYPE &&
98100 ! item . claimedByEmail ;
99101
100102 return (
Original file line number Diff line number Diff line change @@ -318,26 +318,25 @@ export const ItemInputBox = ({
318318 payloadToBeSent ?. type === IMAGING_REQUEST_ITEM_TYPE
319319 ? message
320320 : message ?. trim ( ) || payloadToBeSent ;
321- if ( ! isAsGridPayloadLoading && hasSomethingToSend
322- ) {
323- sendItem ( ) ;
321+ if ( ! isAsGridPayloadLoading && hasSomethingToSend ) {
322+ sendItem ( ) ;
323+ }
324+ event . preventDefault ( ) ;
324325 }
325- event . preventDefault ( ) ;
326- }
327- } )
328- }
329- onPaste = { handlePaste }
330- onItemSelected = { ( { item } ) => addUnverifiedMention ?.( item ) }
331- rows = { 1 }
332- css = { css `
333- box- sizing: bor der- box;
334- background- color : transparent;
335- bor der: none;
336- vertical- align: middle;
337- & : focus-visible {
338- outline : none;
326+ } )
339327 }
340- /* Firefox needs this hint to get the correct initial height.
328+ onPaste = { handlePaste }
329+ onItemSelected = { ( { item } ) => addUnverifiedMention ?.( item ) }
330+ rows = { 1 }
331+ css = { css `
332+ box- sizing: bor der- box;
333+ background- color : transparent;
334+ bor der: none;
335+ vertical- align: middle;
336+ & : focus-visible {
337+ outline : none;
338+ }
339+ /* Firefox needs this hint to get the correct initial height.
341340 Chrome will sometimes show a scrollbar at 21px, so give it a .1px extra as a nudge not to add one */
342341 height : 21.1px ;
343342 ${ addUnverifiedMention ? "max-height: 74px;" : "" }
You can’t perform that action at this time.
0 commit comments