From 38d587ef62c7e843d45b2f95d3e47834a1a7f4b5 Mon Sep 17 00:00:00 2001 From: carson Date: Mon, 6 Jul 2020 09:36:03 -0700 Subject: [PATCH] Move `view` modifier to `show` --- src/htmx.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/htmx.js b/src/htmx.js index 17cc504c..7a5478b5 100644 --- a/src/htmx.js +++ b/src/htmx.js @@ -1337,8 +1337,8 @@ return (function () { if (modifier.indexOf("scroll:") === 0) { swapSpec["scroll"] = modifier.substr(7); } - if (modifier.indexOf("view:") === 0) { - swapSpec["view"] = modifier.substr(5); + if (modifier.indexOf("show:") === 0) { + swapSpec["show"] = modifier.substr(5); } } } @@ -1373,11 +1373,11 @@ return (function () { target.scrollTop = target.scrollHeight; } } - if (swapSpec.view) { - if (swapSpec.view === "top") { + if (swapSpec.show) { + if (swapSpec.show === "top") { target.scrollIntoView(true); } - if (swapSpec.view === "bottom") { + if (swapSpec.show === "bottom") { target.scrollIntoView(false); } }