Skip to content
Merged
Changes from all 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
Expand Up @@ -451,7 +451,7 @@ export const Section = () => {
setSearchProperties(matched as CssProperty[]);
};

const afterAddingStyles = () => {
const afterChangingStyles = () => {
setIsAdding(false);
requestAnimationFrame(() => {
// We are either focusing the last value input from the recent list if available or the search input.
Expand All @@ -476,7 +476,7 @@ export const Section = () => {
</Box>
<CopyPasteMenu
onPaste={handleInsertStyles}
properties={currentProperties}
properties={[...recentProperties, ...currentProperties]}
>
<Flex gap="2" direction="column">
<Flex
Expand All @@ -502,6 +502,7 @@ export const Section = () => {
(recentProperty) => recentProperty !== property
)
);
afterChangingStyles();
}}
/>
);
Expand All @@ -519,10 +520,10 @@ export const Section = () => {
onSubmit={(cssText: string) => {
const styles = handleInsertStyles(cssText);
if (styles.size > 0) {
afterAddingStyles();
afterChangingStyles();
}
}}
onClose={afterAddingStyles}
onClose={afterChangingStyles}
onFocus={() => {
if (isAdding === false) {
handleShowAddStyleInput();
Expand Down