-
-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable previous button (resolves #888) #1093
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @Saira-A and @LanieOkorodudu!
Description of what you did:
Disable previous button from being accessible via keyboard when on first page #888