oficina / docs Public

Delta review P3s (#105): IME Escape guard, leave once, phone toolbar no vertical scroll

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev f2e2ccdb356a3e2fa3f774418ee35b8f36a827c2 parent cea3df3
3 files changed, +15 −4
  • internal/docs/brand/list.js +8 −2
  • internal/docs/delete.go +3 −2
  • internal/docs/views/show.html +4 −0

CI passed — run details

diff --git a/internal/docs/brand/list.js b/internal/docs/brand/list.js
index f0c0c31..44862fe 100644
--- a/internal/docs/brand/list.js
+++ b/internal/docs/brand/list.js
@@ -19,15 +19,21 @@
if (!input || !input.value) return;
var clear = document.querySelector("[docs-search-clear]");
if (clear) clear.hidden = true;
+ // Once: the × fires both an input with no inputType and "search".
+ var left = false;
var leave = function () {
- if (input.value === "") location.assign("/");
+ if (input.value !== "" || left) return;
+ left = true;
+ location.assign("/");
};
input.addEventListener("search", leave);
input.addEventListener("input", function (e) {
if (!e.inputType) leave();
});
input.addEventListener("keydown", function (e) {
- if (e.key !== "Escape" || input.value === "" || e.isComposing) return;
+ // keyCode 229: WebKit ends a composition before the Escape that
+ // cancels it, so isComposing alone lets that Escape clear the query.
+ if (e.key !== "Escape" || input.value === "" || e.isComposing || e.keyCode === 229) return;
e.preventDefault();
input.value = "";
leave();
diff --git a/internal/docs/delete.go b/internal/docs/delete.go
index bac3992..38496fd 100644
--- a/internal/docs/delete.go
+++ b/internal/docs/delete.go
@@ -69,8 +69,9 @@ func (h *handlers) deleteGet(w http.ResponseWriter, r *http.Request) {
// Anybody else with the document open at that moment is not told: their
// next save is refused with the 404 every write to a deleted document
// gets (deleted_at IS NULL in each write's check), which save-queue.mjs
-// takes as permanent and reports as a failed save. A live "this document was deleted" notice
-// is not built; the suite feed already carries the gone row for one.
+// takes as permanent and reports as a failed save. A live "this
+// document was deleted" notice is not built; the suite feed already
+// carries the gone row one would need.
func (h *handlers) deletePost(w http.ResponseWriter, r *http.Request) {
if !h.requireMemberRequest(w, r, true) {
return
diff --git a/internal/docs/views/show.html b/internal/docs/views/show.html
index a98622b..b9b6380 100644
--- a/internal/docs/views/show.html
+++ b/internal/docs/views/show.html
@@ -1174,6 +1174,10 @@
[docs-toolbar] {
flex-wrap: nowrap;
overflow-x: auto;
+ /* Not auto, which overflow-x: auto would make it: the combos'
+ absolutely placed live regions reach 13px below the bar, and
+ the strip then scrolled up and down under a finger. */
+ overflow-y: hidden;
overscroll-behavior-x: contain;
scrollbar-width: thin;
padding-block-end: 2px;