Next/previous links are still clickable on first, last and current page
kstratis opened this issue · comments
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).
Next
may look to be disabled but the ajax request goes through nonetheless.
This is a look at Chrome inspector.
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.
Related to: mislav/will_paginate#551
Any better ideas?
I'm happy to take a pull request if someone has a fix for this, but I don't have the time to work on it and won't in the near future.