Skip to content
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

Next/previous links are still clickable on first/last page #551

Closed
kstratis opened this issue Aug 7, 2017 · 2 comments
Closed

Next/previous links are still clickable on first/last page #551

kstratis opened this issue Aug 7, 2017 · 2 comments

Comments

@kstratis
Copy link

kstratis commented Aug 7, 2017

Using Rails 5.1.2 and will_paginate 3.1.6 it seems that even when a user is on the last/first page of the dataset, next and previous links are still clickable and generate an ajax request(using turbolinks).

disabled_link

Next may look to be disabled but the ajax request goes through nonetheless.

This is a look at Chrome inspector.

disabled_link_users

Is this behavior intentional?

EDIT: I've found a workaround to get the behavior I want by setting the following in my css:

.disabled {
  pointer-events: none;
}

but it's probably not the proper way to do it.

Any better ideas?

@ghost
Copy link

ghost commented Aug 11, 2017

I use Rails 5.1 and didn't had same problem ever. Possibly problem isn't in WillPaginate , but in your WillPaginate theme.

@kstratis
Copy link
Author

It turns out you are right @ctl.

Indeed, I forgot to mention that I'm also using the bootstrap-will_paginate gem.

If I remove bootstrap-will_paginate, the links turn ugly but are no longer clickable as they shouldn't be in the first place. I' m closing the issue here and opening a new one in the gem's repo.

Thanks.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant