Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(94)

Issue 2067042: Fix Esc/^S handling on khtml-based browsers... these only get events onkeydown, (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 9 months ago by Ilia Mirkin
Modified:
15 years, 9 months ago
Reviewers:
gvrpython, guido, techtonik, GvR, imirkin
CC:
codereview-discuss_googlegroups.com
Visibility:
Public.

Description

Fix Esc/^S handling on khtml-based browsers... these only get events onkeydown, apparently. Also fix Esc-related bug for draftMessage; the message object will always be there, but we only want to close it when it's visible.

Patch Set 1 #

Total comments: 10

Patch Set 2 : Fixed line length, removed tab #

Total comments: 4

Patch Set 3 : Minor changes to js #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -2 lines) Patch
M static/script.js View 1 2 4 chunks +9 lines, -2 lines 0 comments Download
M templates/diff.html View 1 1 chunk +13 lines, -0 lines 0 comments Download
M templates/diff2.html View 1 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 14
Ilia Mirkin
Tested on Chrome 5, 6 on Linux (and made sure it didn't change behaviour on ...
15 years, 9 months ago (2010-08-30 02:14:37 UTC) #1
techtonik
Converting keydown event into keypress and altering keypress event handler to catch converted event looks ...
15 years, 9 months ago (2010-08-31 11:05:28 UTC) #2
imirkin_alum.mit.edu
On Tue, Aug 31, 2010 at 7:05 AM, <techtonik@gmail.com> wrote: > Converting keydown event into ...
15 years, 9 months ago (2010-08-31 13:24:47 UTC) #3
gvrpython
I have no objection to the code although I have not thoroughly reviewed it (still ...
15 years, 9 months ago (2010-08-31 14:15:09 UTC) #4
imirkin_alum.mit.edu
On Tue, Aug 31, 2010 at 10:14 AM, Guido van Rossum <guido@python.org> wrote: > I ...
15 years, 9 months ago (2010-08-31 14:28:58 UTC) #5
techtonik
On Tue, Aug 31, 2010 at 4:24 PM, Ilia Mirkin <imirkin@alum.mit.edu> wrote: >> >> Handling ...
15 years, 9 months ago (2010-08-31 15:11:08 UTC) #6
gvrpython
On Tue, Aug 31, 2010 at 7:28 AM, Ilia Mirkin <imirkin@alum.mit.edu> wrote: > On Tue, ...
15 years, 9 months ago (2010-08-31 15:18:33 UTC) #7
imirkin_alum.mit.edu
On Tue, Aug 31, 2010 at 11:11 AM, anatoly techtonik <techtonik@gmail.com> wrote: > On Tue, ...
15 years, 9 months ago (2010-08-31 15:49:36 UTC) #8
imirkin_alum.mit.edu
On Tue, Aug 31, 2010 at 11:01 AM, Guido van Rossum <guido@python.org> wrote: > I ...
15 years, 9 months ago (2010-08-31 15:53:51 UTC) #9
guido
LG, just whitespace comments. I checked and the Linux problem with ^S is gone when ...
15 years, 9 months ago (2010-08-31 17:00:44 UTC) #10
Ilia Mirkin
Fixes uploaded. Those intermediary functions are silly -- I think those were from my lack ...
15 years, 9 months ago (2010-09-01 03:05:56 UTC) #11
guido
I'll see if Anatoly's patch can be gotten into shape. On Tue, Aug 31, 2010 ...
15 years, 9 months ago (2010-09-01 14:37:43 UTC) #12
guido
Some comments from an anonymous Googler with JavaScript readability. I am still waiting for an ...
15 years, 9 months ago (2010-09-01 17:09:40 UTC) #13
Ilia Mirkin
15 years, 9 months ago (2010-09-02 04:59:41 UTC) #14
All done.

http://codereview.appspot.com/2067042/diff/13001/14001
File static/script.js (right):

http://codereview.appspot.com/2067042/diff/13001/14001#newcode2037
static/script.js:2037: if (key == 's' || key == 'S' || code == 19 /* ASCII code
for ^S */) {
On 2010/09/01 17:09:41, guido wrote:
> Seems it would be better to do key.toLowerCase() before doing the ==
comparison,
> and there only if you aren't using capital S for some other purpose.
> 

The key appears to come back as 'S' for chrome when doing ^S, but 's' for
firefox. This is because sometimes it's a keypress, other times it's a keydown.

Changed, although frankly I prefer having them separate.

http://codereview.appspot.com/2067042/diff/13001/14001#newcode2958
static/script.js:2958: return this.get_dialog_().style.display == "";
On 2010/09/01 17:09:41, guido wrote:
> That will only work if whatever js doing the show dialog sets style.display ==
> '' (many people inadvertently do .style.display = 'block';
> It would be better to do this.get_dialog_().style.display != 'none' I think
> 

whatever js does set style.display to '' (see dialog_show). Anyways, changed.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b