[Bug] iOS Reddit app resets boolean form fields to defaultValue when scrolled out of view
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 56/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- ios, typescript
- 領域
- mobile
調査の方向性
Start by tracing how Devvit.createForm and context.ui.showForm pass boolean field state to the iOS form controls, then find where recycled cells initialize their toggle values. Compare that path with the working Android or desktop behavior. Done means a toggled value stays visible after scrolling off-screen and is submitted correctly on iOS; verify with the reproduction steps in the issue.
索引モデルが issue の本文から書いたものです。
説明
Description
When using Devvit.createForm (or context.ui.showForm), fields of type: "boolean" reset to their defaultValue when scrolled out of the visible viewport in the iOS Reddit app.
When a user toggles a boolean switch, scrolls down to complete the rest of the form, and taps the submit button, the reset defaultValue is submitted in the FormOnSubmitEvent.values payload rather than the user's toggled state.
Platform Comparison
- iOS Reddit app (Bug): Toggling a boolean, scrolling it out of view, and scrolling back up shows the toggle visibly snapped back to
defaultValue. Submitting sendsdefaultValue. - Android Reddit app: Works properly. Toggled state is preserved across scrolling/view recycling.
- Desktop Web: Works properly.
Steps to Reproduce
- Define a form with enough fields to require scrolling on mobile, placing a
type: "boolean"field withdefaultValue: trueat the top:
Devvit.createForm(
{
title: "Test Form",
acceptLabel: "Save",
fields: [
{
name: "enable_feature",
label: "Enable Feature",
type: "boolean",
defaultValue: true,
},
{ name: "field_1", label: "Option 1", type: "string" },
{ name: "field_2", label: "Option 2", type: "string" },
{ name: "field_3", label: "Option 3", type: "string" },
{ name: "field_4", label: "Option 4", type: "string" },
{ name: "field_5", label: "Option 5", type: "string" },
],
},
(event, context) => {
console.log("Submitted values:", event.values);
}
);
- Open the form on the iOS Reddit app.
- Toggle
enable_featurefromtruetofalse. - Scroll down until the
enable_featureswitch is completely off-screen. - Either scroll back up (the toggle will have visibly snapped back to
true), or tap "Save". - Inspect the submitted
event.valuesin logs.
Expected Behavior
Form field state should persist across list/cell recycling on iOS, matching Android and Desktop Web.
Observed Behavior
On iOS, event.values.enable_feature arrives as true (defaultValue). The native iOS cell recycling re-initializes the toggle control from field.defaultValue rather than reading from the active form state model.
Environment
- Devvit version:
0.14.8 - Client: Reddit Mobile App (iOS)
- 主要言語
- TypeScript
- スター
- 217
- フォーク
- 89
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
reddit/devvit のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
-
Bound concurrent filesystem reads during asset discovery and source ZIP generation対応中かも @CR29-22-2805 が 138 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
amosblomqvist/learnharness#1141 ·
メンテナーはふだん 4 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ranxianglei/billion-context#8319 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
tencent-connect/dsh-qqbot#148 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
JimLiu/open-artifact#126 ·
-
bug repro-ready
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
mksglu/context-mode#1454 ·