Skip to content

Commit

Permalink
Fix(Core): Fix intervention error caused by preventDefault in `Touc…
Browse files Browse the repository at this point in the history
…h` events. (issue #546)
  • Loading branch information
Maizify committed Sep 21, 2022
1 parent 164857e commit 61cc1f4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ English | [简体中文](./CHANGELOG_CN.md)
- `Fix(Log)` Fix a typo that misjudged circular reference objects. (issue #566)
- `Fix(Storage)` Fix storage pannel sorting error when setting `storage.defaultStorages` option. (issue #560)
- `Fix(Core)` Fix plugin panel sorting error when setting `pluginOrder` option. (issue #559)
- `Fix(Core)` Fix intervention error caused by `preventDefault` in `Touch` events. (issue #546)
- `Chore` Add option `env['no-core-js']` to disable core-js polyfill. (PR #562)


Expand Down
1 change: 1 addition & 0 deletions CHANGELOG_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- `Fix(Log)` 修复一处误判循环引用对象的笔误。 (issue #566)
- `Fix(Storage)` 修复因设置 `storage.defaultStorages` 导致 Storage 面板排序错误的问题。 (issue #560)
- `Fix(Core)` 修复因设置 `pluginOrder` 导致插件面板排序错误的问题。 (issue #559)
- `Fix(Core)` 修复因 `Touch` 事件中的 `preventDefault` 导致的 intervention 错误。 (issue #546)
- `Chore` 添加 `env['no-core-js']` 选项来停用构建时使用 core-js polyfill。 (PR #562)


Expand Down
6 changes: 3 additions & 3 deletions src/core/core.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,9 @@
class:vc-toggle={showMain}
style="{fontSize ? 'font-size:' + fontSize + ';' : ''}"
data-theme={theme}
on:touchstart|capture={mockTapEvent.touchStart}
on:touchmove|capture={mockTapEvent.touchMove}
on:touchend|capture={mockTapEvent.touchEnd}
on:touchstart|capture|nonpassive={mockTapEvent.touchStart}
on:touchmove|capture|nonpassive={mockTapEvent.touchMove}
on:touchend|capture|nonpassive={mockTapEvent.touchEnd}
>
<SwitchButton
bind:show={showSwitchButton}
Expand Down
6 changes: 3 additions & 3 deletions src/core/switchButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@
class="vc-switch"
style="right: {btnSwitchPos.x}px; bottom: {btnSwitchPos.y}px; display: {show ? 'block' : 'none'};"
bind:this={btnSwitch}
on:touchstart={onTouchStart}
on:touchend={onTouchEnd}
on:touchmove={onTouchMove}
on:touchstart|nonpassive={onTouchStart}
on:touchend|nonpassive={onTouchEnd}
on:touchmove|nonpassive={onTouchMove}
on:click
>vConsole</div>

0 comments on commit 61cc1f4

Please sign in to comment.