page assertion/spacebar bug

Bug #157446 reported by paul.n
2
Affects Status Importance Assigned to Milestone
Scribe2
Fix Released
Medium
raj
1.1
Fix Released
Undecided
raj

Bug Description

when asserting a page number (for example: when encountering an un-numbered illustrations), use of the spacebar prevents the assertion from sticking.

to reproduce this error, follow these steps:

1. shot a 50 page test book
2. go to republisher
3. assert page #1
4. slide to the middle of the book (using the 2-up view)
5. assert a page number by using the mouse to check the page number box
6. user the space bar to move forward to the next spread

7. click the back arrow

you will see that your last page assertion is no longer saved/checked.

Tags: republisher
Revision history for this message
raj (raj-archive) wrote :

This is an excellent bug report.. thanks!

I'll work on fixing it ASAP.

Changed in scribe2:
importance: Undecided → Medium
assignee: nobody → raj-archive
raj (raj-archive)
Changed in scribe2:
milestone: none → 1.1bugfix
Revision history for this message
raj (raj-archive) wrote :

Ugh. Firefox uses the spacebar as a keyboard shortcut to toggle checkboxes. So when someone clicks a page assertion checkbox, and then hits the spacebar, Firefox first handles the spacebar keypress and disables the checkbox, and then RePublisher handles the spacebar keypress, and goes to the next set of pages, but by this time, the assertion checkbox is no longer selected.

One thought about how to fix this would be to disable FireFox's spacebar keyboard shortcut, so it didn't stomp on RePublisher's keyboard shortcuts. Using the FF keyconfig extension, I could map the spacebar to null, which removed the default FF 'page down' action when hitting the spacebar when no form elements are selected. However, if the checkbox (or another form element is selected), FF still handles the spacebar key event. So it seems that it is not possible to disable FF's spacebar shortcut for checkboxes.

Another solution is to disable RePublisher's spacebar key handler when the page assertion checkbox has been clicked. This would keep spacebar as the keyboard shortcut for 'next set of pages' in most cases (note that the ']' key is also a shortcut for the same action). However, if the user clicked the page assertion checkbox, the spacebar would no longer work as a shortcut. How does that sound?

Revision history for this message
raj (raj-archive) wrote :

Well, after prototyping the fix outlined above, I think I have a better solution: programatically change focus away from the checkbox once it is clicked.

raj (raj-archive)
Changed in scribe2:
status: New → Confirmed
Revision history for this message
raj (raj-archive) wrote :

Things seem fixed if I change focus to the "next ->" link whenever the pagenum checkbox is clicked.

Index: RePublisher-scribe.php
===================================================================
RCS file: /var/cvs/petabox/www/datanode/RePublisher/RePublisher-scribe.php,v
retrieving revision 1.30
diff -r1.30 RePublisher-scribe.php
459c459
< <a href="#" onclick="nextPages(-1); return false;"><- prev</a> &nbsp; <a href="#" onclick="nextPages(1); return false;">next -></a><br>
---
> <a href="#" onclick="nextPages(-1); return false;"><- prev</a> &nbsp; <a href="#" onclick="nextPages(1); return false;" id="nextLink">next -></a><br>

Index: RePublisher.js
===================================================================
RCS file: /var/cvs/petabox/www/datanode/RePublisher/RePublisher.js,v
retrieving revision 1.54
diff -r1.54 RePublisher.js
338c338
<
---
> $('nextLink').focus();

Changed in scribe2:
milestone: 1.1bugfix → none
status: Confirmed → Fix Committed
Revision history for this message
raj (raj-archive) wrote :

Hi Paul,
Mario pushed out the bug fix. Is it working for you?

Changed in scribe2:
assignee: raj-archive → paul-n
Revision history for this message
raj (raj-archive) wrote :

Sorry, it seems Boston didn't get the new code yet.

raj (raj-archive)
Changed in scribe2:
assignee: paul-n → raj-archive
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.