mirror of
https://github.com/SuperBFG7/ympd
synced 2025-01-27 09:24:54 +00:00
Fix: don't close menu on volume down/up click
This commit is contained in:
parent
068a7b723a
commit
4540e853ff
@ -59,11 +59,11 @@
|
||||
<h2 class="dropdown-header text-light">Volume: <span id="volumePrct"></span></h2>
|
||||
<form class="px-4 py-0 pb-3" id="volumeControl">
|
||||
<div class="btn-group">
|
||||
<button data-href='{"cmd": "chVolume", "options": [-5]}' class="btn btn-secondary">−</button>
|
||||
<button id="btnChVolumeDown" data-href='{"cmd": "chVolume", "options": [-5]}' class="btn btn-secondary">−</button>
|
||||
<div class="btn btn-secondary">
|
||||
<input type="range" min="0" max="100" step="1" class="form-control-range" id="volumeBar">
|
||||
</div>
|
||||
<button data-href='{"cmd": "chVolume", "options": [5]}' class="btn btn-secondary">+</button>
|
||||
<button id="btnChVolumeUp" data-href='{"cmd": "chVolume", "options": [5]}' class="btn btn-secondary">+</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
@ -295,6 +295,14 @@ function appInit() {
|
||||
webSocketConnect();
|
||||
|
||||
domCache.volumeBar.value = 0;
|
||||
|
||||
document.getElementById('btnChVolumeDown').addEventListener('click', function(event) {
|
||||
event.stopPropagation();
|
||||
}, false);
|
||||
document.getElementById('btnChVolumeUp').addEventListener('click', function(event) {
|
||||
event.stopPropagation();
|
||||
}, false);
|
||||
|
||||
domCache.volumeBar.addEventListener('click', function(event) {
|
||||
event.stopPropagation();
|
||||
}, false);
|
||||
|
Loading…
Reference in New Issue
Block a user