PDA

View Full Version : [FIXED] Paging toolbar does not react on the keys PAGEUP, PAGEDOWN, Shift+UP and Shift+DOWN



Qtx
7 Oct 2011, 8:11 AM
REQUIRED INFORMATION


Ext version tested:


Ext 4.0.2



Browser versions tested against:


IE 9.0.8112.16421
FF 6.0.2, firebug 1.8.2
Opera 11.50
Chrome 14
Safari 5.0.5



Description:


Paging toolbar does not react on the keys PAGEUP, PAGEDOWN, Shift+UP and Shift+DOWN.



Steps to reproduce the problem:


Go to the demo example http://dev.sencha.com/deploy/ext-4.0.2a/examples/grid/paging.html
Go into the field of the current page number
Try to use the keys PAGEUP, PAGEDOWN, Shift+UP and Shift+DOWN.
No reaction.



The result that was expected:


The current page should change.



The result that occurs instead:


The current page does not change.



Test Case:


HELPFUL INFORMATION



See this URL for live test case: http://dev.sencha.com/deploy/ext-4.0.2a/examples/grid/paging.html


Debugging already done:


yes



Possible fix:


The problem is in the method onPagingKeyDown of the class Paging.
The setting action does not occur at all



if (pageNum >= 1 && pageNum <= pageData.pages) {
field.setValue(pageNum);
}

This is because the prperty 'page' in pageData.pages does not exist at all, getPageData does not return any property 'pages'. Aparently, is is the rest from the version 3. It should be pageData.pageCount.
The interesting question is why the UP and DOWN work. The answer is they work because the field is a number field and this behaviour is there programmed.
If you change pageData.pages to pageData.pageCount at this place, other problem occurs. If the cause of using the UP and DOWN, the page is inceremented not by 1 but by 2. Once due to the behavior of the number field, and once due to the command pageNum += increment; in the the method onPagingKeyDown. The command e.stopEvent() seems not to work.
Setting keyNavEnabled: false by the number field of the Paging Toolbap helps



Additional CSS used:


only default ext-all.css
custom css (include details)



Operating System:


Windows 7