yrgoldteeth / bootstrap-will_paginate

Format will_paginate html to match Twitter Bootstrap styling

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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).

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.

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.