Arrow keys and tab keys do not work since nsWindow does not respond to WM_GETDLGCODE with DLGC_WANTALLKEYS

NEW
Unassigned

Status

()

Core
Widget: Win32
8 years ago
8 years ago

People

(Reporter: Albert Chu, Unassigned)

Tracking

unspecified
x86
Windows XP
Points:
---

Firefox Tracking Flags

(blocking2.0 -)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729)
Build Identifier: nsWindow does not response to WM_GETDLGCODE

The main message loop in nsWindow needs to be modified to handle WM_GETDLGCODE with the result DLGC_WANTALLKEYS.

PRBool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
                                LRESULT *aRetValue)
{
...
  switch (msg) {
	case WM_GETDLGCODE:
	  {
		  result = PR_TRUE;
		  *aRetValue = DLGC_WANTALLKEYS;
		  break;
	  }

...
}

Reproducible: Always
Status: UNCONFIRMED → NEW
blocking2.0: --- → ?
Component: General → Widget: Win32
Ever confirmed: true
QA Contact: general → win32
This might be a good idea but it doesn't need to block FF4.
blocking2.0: ? → -
I don't think that this change is useful in normal cases. Does your application need the such response? If so, what kind of application is it? And WM_GETDLGCODE should set another flags too if this should be fixed. But for that, we need to query current focused content, that needs more changes...
(Reporter)

Comment 3

8 years ago
Created attachment 497682 [details] [diff] [review]
A patch for responding to WM_GETDLGCODE, although I'm not sure if it's the right version of nsWindow :)
(Reporter)

Comment 4

8 years ago
Hi, thanks for the quick feedback.

We have an MFC based application where a popup window is launched.  This popup contains contains a web browser with form data.

The arrow and tab keys are then used in the form accordingly.
(In reply to comment #4)
> Hi, thanks for the quick feedback.
> 
> We have an MFC based application where a popup window is launched.  This popup
> contains contains a web browser with form data.
> 
> The arrow and tab keys are then used in the form accordingly.

Ah, do you mean that the application is a Gecko embedded browser?
Isn't also DLGC_WANTCHARS needed?
http://msdn.microsoft.com/en-us/library/ms645425%28v=vs.85%29.aspx

And why do you change WM_ENDSESSION handler too?

And please read our coding rules:
https://developer.mozilla.org/En/Developer_Guide/Coding_Style
(Reporter)

Comment 7

8 years ago
Hi,

Regarding the application, it is not an embedded browser.  It is a desktop MFC application which launches a popup window which contains an embedded browser.

I don't believe WM_ENDSESSION has changed.
(In reply to comment #7)
> I don't believe WM_ENDSESSION has changed.

You inserted your code between |case WM_ENDSESSION:| and |case MOZ_WM_APP_QUIT:|.
(Reporter)

Comment 9

8 years ago
Oh, my apologies.  I copied the change from a different version of nsWindow.
You need to log in before you can comment on or make changes to this bug.