Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unclickable vc-cmd-clear-btn on iOS Safari #564

Merged
merged 1 commit into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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>