Skip to content

Commit

Permalink
fix(log): vc-cmd-clear-btn layout on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
helioszhao committed Sep 9, 2022
1 parent f3aaff5 commit 96422fb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
9 changes: 3 additions & 6 deletions src/log/logCommand.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

// input or textarea
.vc-cmd-input-wrap {
display: block;
display: flex;
align-items: center;
position: relative;
height: (28em / @font);
margin-right: (40em / @font);
Expand Down Expand Up @@ -52,12 +53,8 @@
font-size: 1em;
}
.vc-cmd-clear-btn {
position: absolute;
flex: 1 (40em / @font);
text-align: center;
top: 0;
right: 0;
bottom: 0;
width: (40em / @font);
line-height: (40em / @font);
}
.vc-cmd-btn:active,
Expand Down
20 changes: 10 additions & 10 deletions src/log/logCommand.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,6 @@
</ul>

<div class="vc-cmd-input-wrap">
{#if cmdValue.length > 0}
<div class="vc-cmd-clear-btn" on:click|preventDefault={() => onTapClearText('cmd')}>
<Icon name="clear" />
</div>
{/if}
<textarea
class="vc-cmd-input"
placeholder="command..."
Expand All @@ -251,22 +246,27 @@
on:focus={onCmdFocus}
on:blur={onCmdBlur}
></textarea>
{#if cmdValue.length > 0}
<div class="vc-cmd-clear-btn" on:click|preventDefault={() => onTapClearText('cmd')}>
<Icon name="clear" />
</div>
{/if}
</div>
</form>

<form class="vc-cmd vc-filter" on:submit|preventDefault={onFilterSubmit}>
<button class="vc-cmd-btn" type="submit">Filter</button>
<ul class='vc-cmd-prompted'></ul>
<div class="vc-cmd-input-wrap">
{#if filterValue.length > 0}
<div class="vc-cmd-clear-btn" on:click|preventDefault={() => onTapClearText('filter')}>
<Icon name="clear" />
</div>
{/if}
<textarea
class="vc-cmd-input"
placeholder="filter..."
bind:value={filterValue}
></textarea>
{#if filterValue.length > 0}
<div class="vc-cmd-clear-btn" on:click|preventDefault={() => onTapClearText('filter')}>
<Icon name="clear" />
</div>
{/if}
</div>
</form>

0 comments on commit 96422fb

Please sign in to comment.