mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-27 01:40:20 +08:00
Fix slider released event not triggering when released on mobile (#4098)
* Fix slider released event not triggering when released on mobile * Update CHANGELOG * fix range test * retrigger --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This commit is contained in:
parent
5ef0bfeefc
commit
fab7642414
@ -12,6 +12,7 @@
|
||||
- Fixed bug where type hints in functions caused the event handler to crash by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 4068](https://github.com/gradio-app/gradio/pull/4068)
|
||||
- Fix dropdown default value not appearing by [@aliabid94](https://github.com/aliabid94) in [PR 4072](https://github.com/gradio-app/gradio/pull/4072).
|
||||
- Soft theme label color fix by [@aliabid94](https://github.com/aliabid94) in [PR 4070](https://github.com/gradio-app/gradio/pull/4070)
|
||||
- Fix `gr.Slider` `release` event not triggering on mobile by [@space-nuko](https://github.com/space-nuko) in [PR 4098](https://github.com/gradio-app/gradio/pull/4098)
|
||||
- Removes extraneous `State` component info from the `/info` route by [@abidlabs](https://github.com/freddyaboulton) in [PR 4107](https://github.com/gradio-app/gradio/pull/4107)
|
||||
|
||||
## Documentation Changes:
|
||||
|
@ -43,7 +43,7 @@
|
||||
on:blur={clamp}
|
||||
{step}
|
||||
{disabled}
|
||||
on:mouseup={handle_release}
|
||||
on:pointerup={handle_release}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@ -57,7 +57,7 @@
|
||||
max={maximum}
|
||||
{step}
|
||||
{disabled}
|
||||
on:mouseup={handle_release}
|
||||
on:pointerup={handle_release}
|
||||
/>
|
||||
|
||||
<style>
|
||||
|
@ -6,7 +6,7 @@ import Range from "./Range.svelte";
|
||||
describe("Range", () => {
|
||||
afterEach(() => cleanup());
|
||||
|
||||
test("Release event called on blur and mouseUp", () => {
|
||||
test("Release event called on blur and pointerUp", () => {
|
||||
const results = render(Range, {
|
||||
label: "range",
|
||||
show_label: true,
|
||||
@ -19,7 +19,7 @@ describe("Range", () => {
|
||||
const mock = vi.fn();
|
||||
results.component.$on("release", mock);
|
||||
|
||||
fireEvent.mouseUp(numberInput);
|
||||
fireEvent.pointerUp(numberInput);
|
||||
|
||||
expect(mock).toHaveBeenCalledOnce();
|
||||
|
||||
|
3121
pnpm-lock.yaml
3121
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user