summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-11-22 14:47:56 +0100
committerJo-Philipp Wich <jo@mein.io>2018-11-22 14:47:56 +0100
commit241b90c7f66dd08bca4ff89ea7cfe8aed9823bdd (patch)
treeedbf6fa02e6004078ba823f83ef0ef6b1571e88b /modules/luci-base/luasrc
parent6a0c1d1ab674881f8ebfce3f0ab622e37ff4293e (diff)
luci-base: do not trigger form action when revealing password
Ref: https://github.com/openwrt/luci/issues/2327 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/luasrc')
-rw-r--r--modules/luci-base/luasrc/view/cbi/value.htm2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-base/luasrc/view/cbi/value.htm b/modules/luci-base/luasrc/view/cbi/value.htm
index 79a358b305..27f3cb2bd9 100644
--- a/modules/luci-base/luasrc/view/cbi/value.htm
+++ b/modules/luci-base/luasrc/view/cbi/value.htm
@@ -21,6 +21,6 @@
ifattr(#self.keylist > 0, "data-choices", { self.keylist, self.vallist })
%> />
<%- if self.password then -%>
- <button class="cbi-button cbi-button-neutral" title="<%:Reveal/hide password%>" aria-label="<%:Reveal/hide password%>" onclick="var e = this.previousElementSibling; e.type = (e.type === 'password') ? 'text' : 'password'">∗</button>
+ <button class="cbi-button cbi-button-neutral" title="<%:Reveal/hide password%>" aria-label="<%:Reveal/hide password%>" onclick="var e = this.previousElementSibling; e.type = (e.type === 'password') ? 'text' : 'password'; event.preventDefault()">∗</button>
<% end %>
<%+cbi/valuefooter%>