
|
Bug in keyboard events in webkit?
|

|
Re: Bug in keyboard events in webkit?
On safari ctrl-tab and ctrl-shift-tab switch between the tabs in the browser itself, when the user has multiple pages open at once.
So safari is intercepting the event, it never gets to the javascript code... I wouldn't call it a bug.
On Tue, Nov 10, 2009 at 2:34 AM, Rakesh Pai <rakeshpai@...> wrote:
Consider http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/layout/test_TabContainer.html
If you have focus on a tab, and hit ctrl+tab or ctrl+shift+tab, you are able to move between the tabs in FF. Not so in webkit (tested on safari and chrome).
This looks like a bug, since there's a bunch of code in StackController to make the ctrl+tab work.
This is not a bug in the tab component itself, but probably a bug in the way the event is normalized in webkit based browsers. I know because I've tried to something similar in my own code, and I can't seem to detect the key-combinations.
This happens both in 1.3 and in 1.4.
Can someone confirm if this is a bug? Also, I tried creating a report in trac, but it wouldn't let me login. Any idea what's up?
Regards,
_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
_______________________________________________
FAQ: http://dojotoolkit.org/support/faqBook: http://docs.dojocampus.orgDojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
|

|
Re: Bug in keyboard events in webkit?
So, I tried to investivate this further. Webkit is weird in how it behaves (and this has nothing to do with tab changing). Here's what's happening:
In dojo/_base/event.js, around line 564, dojo checks if the event being listened to is a keypress event. If it is, a synthetic event is created and is populated by listening to the keydown event. Now, ctrl+tab (with maybe any other modifiers) is not reported in webkit with the keydown event. This doesn't work in the keypress event as well, of course. However, when I change the line so that the synthetic event is formulated by listening to the keyup event, the ctrl+tab combination can be captured just fine.
Beats me why keyup would work, and why keydown doesn't. However, keyup is not an ideal event to listen to, since it can't factor in the native keyboard repeat-rate and stuff for one. I'm sure there'll be other problems with it as well.
I don't like the change I've made since I've modified dojo source itself. I would give a patch, but I'm not sure if the solution is good enough. Any idea on how we can proceed with this?
BTW, since 1.4 claims that it has full keyboard support for Safari, I would consider this to be a BLOCKING bug with 1.4. Either that, or we change the docs to say that this release doesn't have full keyboard support for safari.
Thoughts?
Rakesh Pai On Tue, Nov 10, 2009 at 7:12 AM, Bill Keese <wkeese@...> wrote:
On safari ctrl-tab and ctrl-shift-tab switch between the tabs in the browser itself, when the user has multiple pages open at once.
So safari is intercepting the event, it never gets to the javascript code... I wouldn't call it a bug.
On Tue, Nov 10, 2009 at 2:34 AM, Rakesh Pai <rakeshpai@...> wrote:
Consider http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/layout/test_TabContainer.html
If you have focus on a tab, and hit ctrl+tab or ctrl+shift+tab, you are able to move between the tabs in FF. Not so in webkit (tested on safari and chrome).
This looks like a bug, since there's a bunch of code in StackController to make the ctrl+tab work.
This is not a bug in the tab component itself, but probably a bug in the way the event is normalized in webkit based browsers. I know because I've tried to something similar in my own code, and I can't seem to detect the key-combinations.
This happens both in 1.3 and in 1.4.
Can someone confirm if this is a bug? Also, I tried creating a report in trac, but it wouldn't let me login. Any idea what's up?
Regards,
_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
-- Rakesh Pai Mumbai, India. rakesh.pai@...http://piecesofrakesh.blogspot.com/
_______________________________________________
FAQ: http://dojotoolkit.org/support/faqBook: http://docs.dojocampus.orgDojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
|

|
Re: Bug in keyboard events in webkit?
My thought is to just use the left and right arrow keys. That's the main way of switching between tabs. On Tue, Nov 10, 2009 at 9:18 PM, Rakesh Pai <rakeshpai@...> wrote:
So, I tried to investivate this further. Webkit is weird in how it behaves (and this has nothing to do with tab changing). Here's what's happening:
In dojo/_base/event.js, around line 564, dojo checks if the event being listened to is a keypress event. If it is, a synthetic event is created and is populated by listening to the keydown event. Now, ctrl+tab (with maybe any other modifiers) is not reported in webkit with the keydown event. This doesn't work in the keypress event as well, of course. However, when I change the line so that the synthetic event is formulated by listening to the keyup event, the ctrl+tab combination can be captured just fine.
Beats me why keyup would work, and why keydown doesn't. However, keyup is not an ideal event to listen to, since it can't factor in the native keyboard repeat-rate and stuff for one. I'm sure there'll be other problems with it as well.
I don't like the change I've made since I've modified dojo source itself. I would give a patch, but I'm not sure if the solution is good enough. Any idea on how we can proceed with this?
BTW, since 1.4 claims that it has full keyboard support for Safari, I would consider this to be a BLOCKING bug with 1.4. Either that, or we change the docs to say that this release doesn't have full keyboard support for safari.
Thoughts?
Rakesh Pai On Tue, Nov 10, 2009 at 7:12 AM, Bill Keese <wkeese@...> wrote:
On safari ctrl-tab and ctrl-shift-tab switch between the tabs in the browser itself, when the user has multiple pages open at once.
So safari is intercepting the event, it never gets to the javascript code... I wouldn't call it a bug.
On Tue, Nov 10, 2009 at 2:34 AM, Rakesh Pai <rakeshpai@...> wrote:
Consider http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/layout/test_TabContainer.html
If you have focus on a tab, and hit ctrl+tab or ctrl+shift+tab, you are able to move between the tabs in FF. Not so in webkit (tested on safari and chrome).
This looks like a bug, since there's a bunch of code in StackController to make the ctrl+tab work.
This is not a bug in the tab component itself, but probably a bug in the way the event is normalized in webkit based browsers. I know because I've tried to something similar in my own code, and I can't seem to detect the key-combinations.
This happens both in 1.3 and in 1.4.
Can someone confirm if this is a bug? Also, I tried creating a report in trac, but it wouldn't let me login. Any idea what's up?
Regards,
-- Rakesh Pai Mumbai, India. rakesh.pai@...http://piecesofrakesh.blogspot.com/
_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
_______________________________________________
FAQ: http://dojotoolkit.org/support/faqBook: http://docs.dojocampus.orgDojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
|

|
Re: Bug in keyboard events in webkit?
Left and right arrows is one way, ctrl+tab is another. There's no way to know if users are used to one or the other. If both of them are common paradigms, they should be supported. And it is supported everywhere else, except in webkit. And a way to fix it for now is to use keyup.
I think unless we can come up with a better plan, we should either go with the keyup approach, or we should not claim to support webkit so well.
Regards, Rakesh Pai
On Tue, Nov 10, 2009 at 8:08 PM, Bill Keese <wkeese@...> wrote:
My thought is to just use the left and right arrow keys. That's the main way of switching between tabs.On Tue, Nov 10, 2009 at 9:18 PM, Rakesh Pai <rakeshpai@...> wrote:
So, I tried to investivate this further. Webkit is weird in how it behaves (and this has nothing to do with tab changing). Here's what's happening:
In dojo/_base/event.js, around line 564, dojo checks if the event being listened to is a keypress event. If it is, a synthetic event is created and is populated by listening to the keydown event. Now, ctrl+tab (with maybe any other modifiers) is not reported in webkit with the keydown event. This doesn't work in the keypress event as well, of course. However, when I change the line so that the synthetic event is formulated by listening to the keyup event, the ctrl+tab combination can be captured just fine.
Beats me why keyup would work, and why keydown doesn't. However, keyup is not an ideal event to listen to, since it can't factor in the native keyboard repeat-rate and stuff for one. I'm sure there'll be other problems with it as well.
I don't like the change I've made since I've modified dojo source itself. I would give a patch, but I'm not sure if the solution is good enough. Any idea on how we can proceed with this?
BTW, since 1.4 claims that it has full keyboard support for Safari, I would consider this to be a BLOCKING bug with 1.4. Either that, or we change the docs to say that this release doesn't have full keyboard support for safari.
Thoughts?
Rakesh Pai On Tue, Nov 10, 2009 at 7:12 AM, Bill Keese <wkeese@...> wrote:
On safari ctrl-tab and ctrl-shift-tab switch between the tabs in the browser itself, when the user has multiple pages open at once.
So safari is intercepting the event, it never gets to the javascript code... I wouldn't call it a bug.
On Tue, Nov 10, 2009 at 2:34 AM, Rakesh Pai <rakeshpai@...> wrote:
Consider http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/layout/test_TabContainer.html
If you have focus on a tab, and hit ctrl+tab or ctrl+shift+tab, you are able to move between the tabs in FF. Not so in webkit (tested on safari and chrome).
This looks like a bug, since there's a bunch of code in StackController to make the ctrl+tab work.
This is not a bug in the tab component itself, but probably a bug in the way the event is normalized in webkit based browsers. I know because I've tried to something similar in my own code, and I can't seem to detect the key-combinations.
This happens both in 1.3 and in 1.4.
Can someone confirm if this is a bug? Also, I tried creating a report in trac, but it wouldn't let me login. Any idea what's up?
Regards,
-- Rakesh Pai Mumbai, India. rakesh.pai@...http://piecesofrakesh.blogspot.com/
_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
-- Rakesh Pai Mumbai, India. rakesh.pai@...http://piecesofrakesh.blogspot.com/
_______________________________________________
FAQ: http://dojotoolkit.org/support/faqBook: http://docs.dojocampus.orgDojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
|