View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012339 | Taler | wallet (iOS App) | public | 2026-11-27 01:42 | 2026-11-27 01:42 |
| Reporter | bot-cg [agent] | ||||
| Priority | normal | Severity | minor | ||
| Status | new | ||||
| Summary | 0012339: The full-page error leaves the keyboard up: on Send and Deposit the amount pad stays under "Network problem" and keys go into the hidden amount field (patch attached) | ||||
| Description | When a request fails and the app shows its full-page error, a text field that is being edited keeps the keyboard. The keyboard stays on screen under the error, and keys pressed on it change the field that the error hides. How to see it (GNU Taler 1.6.19, master 16f6f629, iPhone 17 simulator, iOS 27.2; the same on Taler Nightly) ---------------------------------------------------------------------- It takes a request that fails while a page with a focused field is open. Here wallet-core was told to fail one (a dev experiment of the test harness, `taler://dev-experiment/api-error?operation= getMaxPeerPushDebitAmount&...`): 1. With some KUDOS in the wallet: Actions > Send. The page asks for the maximum that can be sent (SendAmountV.swift:93); that request fails. 2. "Network problem / injected by the harness / OK" fills the page -- and the amount pad is on screen below it (picture attached, error-page-keyboard-before-after.jpg, left half, first panel). 3. Press 5 on the pad. Nothing visible changes (second panel); wallet-core receives a fee check for KUDOS:0.05. 4. OK. The Send page appears with 0.05 in the amount field (third panel). The same picture on the Deposit amount page when its request for the maximum fails (DepositAmountAction.swift:70). NOT shown without an injected error: these two requests do not fail by themselves. The mechanism below does not depend on which request failed, though -- any error presented this way while a field has the focus leaves the keyboard up. Cause ----- The error page is not a sheet. It is one more view in the main ZStack (MainView.swift:204-209): if let error2 = model.error2 { ErrorView(stack.push("Main"), data: error2, devMode: developerMode) { model.setError(nil) }.interactiveDismissDisabled() .background(FullBackground()) so it covers the page without taking anything away from it: the field below stays first responder, and the system draws its keyboard above everything. An amount page also focuses its field a moment after it appears, so the focus can arrive after the error page is already there. Proposed fix (error-page-ends-editing-v16f6f629.diff, against 16f6f629) ---------------------------------------------------------------------- On that ErrorView: end editing when it appears, and again whenever a keyboard shows while it is on screen. .onAppear { Self.endEditing() } .onReceive(NotificationCenter.default.publisher( for: UIResponder.keyboardDidShowNotification)) { _ in Self.endEditing() } Built and photographed (right half): the error page has no pad under it, there is nothing to type on, and after OK the amount is still 0.00. A first version with the `onAppear` alone was built and run too and changed nothing: in this flow the field takes the focus after the error page has appeared. After OK the keyboard does not come back by itself with the patch; the field has to be tapped. Found by a scenario of the test harness written for the failure branch of that request (SendAmountV.swift:94-97), which no test had reached. | ||||
| Tags | No tags attached. | ||||
| Attached Files | error-page-ends-editing-v16f6f629.diff (1,214 bytes)
--- a/TalerWallet1/Views/Main/MainView.swift 2026-11-27 01:30:46.110986547 +0100
+++ b/TalerWallet1/Views/Main/MainView.swift 2026-11-27 02:25:02.655444684 +0100
@@ -207,6 +207,17 @@
model.setError(nil)
}.interactiveDismissDisabled()
.background(FullBackground())
+ // This view covers the page but is no sheet: a field that is
+ // being edited keeps the keyboard, which stays on screen and
+ // goes on typing into the hidden field. The field can also
+ // take the focus AFTER the error came up (an amount page
+ // focuses its field a moment after it appears, and its first
+ // request may have failed by then), hence both.
+ .onAppear { Self.endEditing() }
+ .onReceive(NotificationCenter.default.publisher(
+ for: UIResponder.keyboardDidShowNotification)) { _ in
+ Self.endEditing()
+ }
// .transition(.move(edge: .top))
// } else {
// Color.clear
| ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-11-27 01:42 | bot-cg | New Issue | |
| 2026-11-27 01:42 | bot-cg | Implementer | => MarcS |
| 2026-11-27 01:42 | bot-cg | Reviewer | => vlada.svirsh |
| 2026-11-27 01:42 | bot-cg | Release signed by | => MarcS |
| 2026-11-27 01:42 | bot-cg | Deployed by | => MarcS |
| 2026-11-27 01:42 | bot-cg | Verifier | => MarcS |
| 2026-11-27 01:42 | bot-cg | Communicator | => CM_7 |
| 2026-11-27 01:42 | bot-cg | File Added: error-page-keyboard-before-after.jpg | |
| 2026-11-27 01:42 | bot-cg | File Added: error-page-ends-editing-v16f6f629.diff |