From 44d00255d78bd56e9071e1fce0f0f9713cd3c7b8 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Tue, 4 Nov 2008 15:31:31 +0000 Subject: [PATCH] Fixed missing focus on first/last page. --- includes/db_pager.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/db_pager.inc b/includes/db_pager.inc index ce739535..f00cc906 100644 --- a/includes/db_pager.inc +++ b/includes/db_pager.inc @@ -300,6 +300,12 @@ class db_pager { $sort = find_submit($this->name.'_sort_', false); if ($page) { $this->change_page($page); + if ($page == 'next' && !$this->next_page || + $page == 'last' && !$this->last_page) + set_focus($this->name.'_page_prev'); + if ($page == 'prev' && !$this->prev_page || + $page == 'first' && !$this->first_page) + set_focus($this->name.'_page_next'); } elseif ($sort) { $this->sort_table($sort); } else -- 2.30.2