javascript detect/protect back button presses when content updated?

26 views
Skip to first unread message

Chris Clark

unread,
Jan 21, 2011, 6:27:38 PM1/21/11
to revie...@googlegroups.com
I've recently been using a laptop with forward/back keys. These are
"conveniently" located by the arrow/cursor keys. In a web browser these
keys are the equivalent of alt-left/right (or the backwards/forwards on
screen button).

I've just spent the last 10 mins re-entering (multiple times) in text
for a review description as I fat fingered the back key. I'd not hit the
SAVE button and so I lost my work (the save button was physically off
screen due to the size of the description box.text, saving is a real
pain with the current UI if you have lots of text). I have lost work a
few times in the past by clicking on bug numbers to remind myself (or
copy/paste from) what to put into the description but this is the first
time fat-fingers have caused me to loose review work.

I see this behavior on all versions (including 1.6 alpha on
http://reviews.reviewboard.org/ ).

The other (more) minor annoyance is that I sometimes hit CTRL-s thinking
that this will save (I'm just used to that combo) which of course
doesn't work :-) It tends to call the web browser save as html dialog.

Has anyone else had similar issues? This is an user error but it is a UI
annoyance that could be handled in Reviewboard. I've 2 ideas:

1) support CTRL-S for saving - Google docs does this as does gmail, it
is a small but awesome thing :-)

2) if the description (or testing, etc.) has been updated and navigation
is attempted send up a pop-up "are you sure?", gmail does this when
composing an email and it has not yet been saved. webchat on freenode
does this too, it can even detect window/tab closing.

Comments? This isn't meant to be a complaint, I'm trying to see if I'm
the only one seeing this.

Chris


Christian Hammond

unread,
Jan 22, 2011, 4:04:51 AM1/22/11
to revie...@googlegroups.com
Hi Chris,

We actually do have that check for some things to prevent loss, but I
guess it's not working for the review request fields. Thought we had
that... Anyway, yes, we should get that in for the next 1.5.x. Would
you mind filing a bug on this?

The Control-S is a good idea too. I think that's worth supporting.

Christian

> --
> Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~----------~----~----~----~------~----~------~--~---
> To unsubscribe from this group, send email to reviewboard...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en

Chris M. Clark

unread,
Jan 22, 2011, 5:22:55 PM1/22/11
to revie...@googlegroups.com
Thanks for the quick response.

I logged:

http://code.google.com/p/reviewboard/issues/detail?id=1957 - bug loosing data
http://code.google.com/p/reviewboard/issues/detail?id=1958 - CTRL-S enhancement

winmail.dat
Reply all
Reply to author
Forward
0 new messages