Skip to content

Commit b610c8a

Browse files
committed
fix: when nav buttons are disabled, clicking on it triggers the image download
1 parent 5d75415 commit b610c8a

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2311,8 +2311,8 @@ function RemoteFunctions(config = {}) {
23112311

23122312
_updateNavButtons: function() {
23132313
// this function is responsible to update the nav buttons
2314-
// because when we're at the very left, then we style the nav-left button differently (reduce opacity)
2315-
// and when we're at the very right and no more pages available, we reduce opacity for nav-right
2314+
// when we're at the very left, we hide the nav-left button completely
2315+
// when we're at the very right and no more pages available, we hide the nav-right button
23162316
const navLeft = this._shadow.querySelector('.phoenix-ribbon-nav.left');
23172317
const navRight = this._shadow.querySelector('.phoenix-ribbon-nav.right');
23182318
const container = this._shadow.querySelector('.phoenix-ribbon-strip');
@@ -2321,11 +2321,9 @@ function RemoteFunctions(config = {}) {
23212321

23222322
// show/hide left button
23232323
if (this.scrollPosition <= 0) {
2324-
navLeft.style.opacity = '0.3';
2325-
navLeft.style.pointerEvents = 'none';
2324+
navLeft.style.display = 'none';
23262325
} else {
2327-
navLeft.style.opacity = '1';
2328-
navLeft.style.pointerEvents = 'auto';
2326+
navLeft.style.display = 'block';
23292327
}
23302328

23312329
// show/hide right button
@@ -2335,11 +2333,9 @@ function RemoteFunctions(config = {}) {
23352333
const hasMorePages = this.currentPage < this.totalPages;
23362334

23372335
if (atEnd && !hasMorePages) {
2338-
navRight.style.opacity = '0.3';
2339-
navRight.style.pointerEvents = 'none';
2336+
navRight.style.display = 'none';
23402337
} else {
2341-
navRight.style.opacity = '1';
2342-
navRight.style.pointerEvents = 'auto';
2338+
navRight.style.display = 'block';
23432339
}
23442340
},
23452341

0 commit comments

Comments
 (0)