Disable previous button (resolves #888)#1093
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
demiankatz
left a comment
There was a problem hiding this comment.
@Saira-A, if this solves a problem, should we also add parallel behavior to the disableNextButton/enableNextButton methods so everything is consistent?
Like this? This causes another issue where the previous button becomes greyed out when on the last page. Otherwise it still has the runtime error that prevbutton had but it just loops back to the first page instead of going into negative numbers |
@Saira-A, I think you just need to change "$prevButton" to "$nextButton" in that code snippet, so that the next button is disabled instead of the prev button. :-) |
Oops, that would explain it! fixed |
demiankatz
left a comment
There was a problem hiding this comment.
Thanks, @Saira-A! This makes sense to me if @LanieOkorodudu can't find any problems. :-)
I think the prev button still not working using the keyboard.. |
demiankatz
left a comment
There was a problem hiding this comment.
I think I see what @LanieOkorodudu is talking about. I think the prev/next buttons are working now, but there are also first/last buttons that need the same treatment in their functions (just above the ones that have already been adjusted). I think that should fully solve the problem.
It only works if you click the button first and then use the enter key, it doesn't use the left/right arrow keys if that's what you mean @LanieOkorodudu I added the same to the first/last buttons, thanks @demiankatz |
@Saira-A Yes that's what I mean but probably that's different issue to address. I just check it in vercel app and it's working now. Just as you said you have to initiate the click first then press enter key. This should address and solve the issue #888. Thanks again @Saira-A and @demiankatz |
demiankatz
left a comment
There was a problem hiding this comment.
Thanks, @Saira-A and @LanieOkorodudu!
Description of what you did:
Disable previous button from being accessible via keyboard when on first page #888