Last Comment Bug 656089 - Windows magnifier tool doesn't focus correctly when there is a text editing at firefox 4
: Windows magnifier tool doesn't focus correctly when there is a text editing a...
Status: RESOLVED FIXED
: regression, reproducible
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: Trunk
: x86 Windows XP
: -- normal (vote)
: mozilla6
Assigned To: Jim Mathies [:jimm]
:
: alexander :surkov
Mentors:
: 648863 670342 (view as bug list)
Depends on:
Blocks: 722178 513162
  Show dependency treegraph
 
Reported: 2011-05-10 12:02 PDT by Alfredos-Panagiotis Damkalis [:fredy]
Modified: 2012-01-30 08:30 PST (History)
13 users (show)
surkov.alexander: in‑testsuite?
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
mag pic (62.70 KB, image/png)
2011-05-10 13:19 PDT, Jim Mathies [:jimm]
no flags Details
fix v.1 (2.35 KB, patch)
2011-05-20 12:13 PDT, Jim Mathies [:jimm]
no flags Details | Diff | Splinter Review
fix v.1 (1.58 KB, patch)
2011-05-20 12:27 PDT, Jim Mathies [:jimm]
mzehe: review+
Details | Diff | Splinter Review

Description Alfredos-Panagiotis Damkalis [:fredy] 2011-05-10 12:02:48 PDT
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

The magnifier tool helps people with vision problems to magnify the screen and it is vital to focus properly. This doesn't happen when the magnifier option "Follow text editing" is on and there is text editing at firefox 4.

Reproducible: Always

Steps to Reproduce:
1. Open magnifier tool from Start menu-> Programs -> Accessories ->  Accessibility -> Magnifier.
2. Change the height of magnifier window so it can be viewed only one line.
3. Be sure that the option "Follow text editing" at the magnifiers settings is enabled (ticked).
4. Open firefox and click at URL address field at the navigation toolbar.
5. Start typing at the url field.
6. The magnifier window focus is now under this field and not at the field.

Actual Results:  
The focus at firefox 4 when there is text editing is under the text that it should be focused on.

Expected Results:  
The focus at firefox 4 when there is text editing to be at the text that is being edited.

If the "Follow text editing" is not selected (enabled/ticked) then the problem doesn't exist.

This problem occur not only at firefox user interface but also at web pages where you can edit text (like text form fields).
Comment 1 Alice0775 White 2011-05-10 12:17:11 PDT
Bug 648863?
Comment 2 David Bolter [:davidb] 2011-05-10 12:20:29 PDT
Alice, I'm not 100% sure this is a dupe.

Alfredos-Panagiotis, thanks for filing. Can you try changing this in your about:config settings:
gfx.direct2d.disabled true

I'm curious if this has to do with the caret not automatically following our direct write calls.
Comment 3 Alfredos-Panagiotis Damkalis [:fredy] 2011-05-10 12:27:29 PDT
(In reply to comment #2)
> Alice, I'm not 100% sure this is a dupe.
> 
> Alfredos-Panagiotis, thanks for filing. Can you try changing this in your
> about:config settings:
> gfx.direct2d.disabled true
> 
> I'm curious if this has to do with the caret not automatically following our
> direct write calls.

Either true or false the bug still exists. :(
Comment 4 Alfredos-Panagiotis Damkalis [:fredy] 2011-05-10 12:35:49 PDT
Alice it sounds to me the same or a too similar bug. I have tried safe mode that it is suggested at that other bug and I have not seen any difference.
Comment 5 Alice0775 White 2011-05-10 12:44:33 PDT
Confirmed with disabled auto hide MenuBar on
http://hg.mozilla.org/mozilla-central/rev/e0f6db50231f
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a1) Gecko/20110510 Firefox/6.0a1 ID:20110510030615

If Enable App Button(i.e enabled auto hide MenuBar), it works properly.
Comment 6 Alice0775 White 2011-05-10 12:58:09 PDT
Regression window(cached m-c nightly):
Works:
http://hg.mozilla.org/mozilla-central/rev/522df66198cf
Mozilla/5.0 (Windows; U; Windows NT 6.1; WOW64; en-US; rv:1.9.3a6pre) Gecko/20100624 Minefield/3.7a6pre ID:20100624185700
Fails:
http://hg.mozilla.org/mozilla-central/rev/51bd519736c4
Mozilla/5.0 (Windows; U; Windows NT 6.1; WOW64; en-US; rv:1.9.3a6pre) Gecko/20100624 Minefield/3.7a6pre ID:20100624221810
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=522df66198cf&tochange=51bd519736c4
Comment 7 Alice0775 White 2011-05-10 12:58:39 PDT
*** Bug 648863 has been marked as a duplicate of this bug. ***
Comment 8 Jim Mathies [:jimm] 2011-05-10 13:17:52 PDT
Hmm, maybe I've not done this right, but it seems to be working for me on Win7. I have "fallow the text insertion point" checked in the magnifier options. When I click on the address bar and type, the magnifier window fallows the cursor. Attaching a screen shot...
Comment 9 Jim Mathies [:jimm] 2011-05-10 13:19:43 PDT
Created attachment 531439 [details]
mag pic
Comment 10 Jim Mathies [:jimm] 2011-05-10 13:20:46 PDT
(In reply to comment #8)
> Hmm, maybe I've not done this right, but it seems to be working for me on
> Win7. I have "fallow the text insertion point" checked in the magnifier
> options. When I click on the address bar and type, the magnifier window
> fallows the cursor. Attaching a screen shot...

bleh: fallows -> follows. brain short circuit.
Comment 11 Alfredos-Panagiotis Damkalis [:fredy] 2011-05-10 13:24:33 PDT
At windows XP is what Alice said that if you hide the menu bar and have the firefox orange button (App Button) everything works fine but if you have the menu bar then the bug shows up.
Comment 12 Alice0775 White 2011-05-10 13:24:59 PDT
(In reply to comment #8)
> Hmm, maybe I've not done this right, but it seems to be working for me on
> Win7. I have "fallow the text insertion point" checked in the magnifier
> options. When I click on the address bar and type, the magnifier window
> fallows the cursor. Attaching a screen shot...

You should _Disable_ Auto Hide MenuBar. 
i.e, Check MenuBar in View > Toolbars > Check MenuBar
Comment 13 Jim Mathies [:jimm] 2011-05-10 13:38:24 PDT
(In reply to comment #12)
> (In reply to comment #8)
> > Hmm, maybe I've not done this right, but it seems to be working for me on
> > Win7. I have "fallow the text insertion point" checked in the magnifier
> > options. When I click on the address bar and type, the magnifier window
> > fallows the cursor. Attaching a screen shot...
> 
> You should _Disable_ Auto Hide MenuBar. 
> i.e, Check MenuBar in View > Toolbars > Check MenuBar

Ok, thanks Alice, I can reproduce.
Comment 14 Jim Mathies [:jimm] 2011-05-10 13:58:21 PDT
Hmm, not sure what the magnifier is doing here. The sdk accessibility inspector doesn't have any trouble matching up the bounding rect of text edits, so it doesn't appear to be an accessibility api problem.
Comment 15 Jim Mathies [:jimm] 2011-05-10 14:10:51 PDT
(In reply to comment #14)
> Hmm, not sure what the magnifier is doing here. The sdk accessibility
> inspector doesn't have any trouble matching up the bounding rect of text
> edits, so it doesn't appear to be an accessibility api problem.

Although, magnifier does appear to be using accessibility apis for it's information.
Comment 16 alexdos 2011-05-10 14:12:14 PDT
As mentioned already on Bug 648863 (I'd say it's exactly the same problem, I was not very clear in explaining) it helps to hide the menu bar in order to type, but the magnified part jumps somewhere else when pressing the arrow keys (most times).
Comment 17 Jim Mathies [:jimm] 2011-05-10 14:42:24 PDT
Hmm, height and width values returned by accLocation are correct. Not sure what's going on here.
Comment 18 Jim Mathies [:jimm] 2011-05-10 14:55:26 PDT
(In reply to comment #17)
> Hmm, height and width values returned by accLocation are correct. Not sure
> what's going on here.

X and Y positions on this call are correct as well, and the caret position we set via nsAccessibleWrap::UpdateSystemCaret() is also correct. So far it's a mystery.
Comment 19 Alice0775 White 2011-05-10 15:21:16 PDT
In addition, this problem occurs with caret browsing mode too.
Comment 20 Jim Mathies [:jimm] 2011-05-20 12:13:02 PDT
Created attachment 534062 [details] [diff] [review]
fix v.1
Comment 21 Jim Mathies [:jimm] 2011-05-20 12:27:29 PDT
Created attachment 534066 [details] [diff] [review]
fix v.1

This broke when we removed child widgets from the view. GetNearestWidget includes any chrome on the widget. In the past content widgets didn't have chrome, but now the top level widget does, so we have to subtract that off from WidgetToScreenOffset which calculates the content offset.

I could also simplify this by adding a new widget method for the window offset, or use GetScreenBounds. This patch makes the fewest changes though.
Comment 22 Jim Mathies [:jimm] 2011-05-20 17:40:27 PDT
I missed a parenthesis in that comments, it should be:

// ((content screen origin) - (content offset in the widget)) = widget origin on the screen
Comment 23 Marco Zehe (:MarcoZ) 2011-05-21 23:25:54 PDT
Comment on attachment 534066 [details] [diff] [review]
fix v.1

Jim, david's going to be on vacation on Monday (Canadian holiday), so if we want to get this into Firefox 6 still, you might want to change the review request to either me or surkov. I looked at the patch, and this definitely looks like the right fix to me.
Comment 24 Jim Mathies [:jimm] 2011-05-22 04:20:02 PDT
Comment on attachment 534066 [details] [diff] [review]
fix v.1

all yours then!
Comment 25 Marco Zehe (:MarcoZ) 2011-05-22 06:25:07 PDT
Comment on attachment 534066 [details] [diff] [review]
fix v.1

r=me, thanks for the patch!
Comment 26 Jim Mathies [:jimm] 2011-05-23 06:10:01 PDT
http://hg.mozilla.org/mozilla-central/rev/6346ef40d7ab
Comment 27 alexander :surkov 2011-05-23 17:37:48 PDT
any change to get mochitest for this?
Comment 28 Jim Mathies [:jimm] 2011-06-20 05:45:16 PDT
(In reply to comment #27)
> any change to get mochitest for this?

Might be possible but tricky I think since it relies on results are based on the desktop position of the browser window.
Comment 29 alexander :surkov 2011-07-12 02:33:01 PDT
*** Bug 670342 has been marked as a duplicate of this bug. ***
Comment 30 kdubfreak 2012-01-26 14:13:53 PST
First, I am new here and not a developer, so sorry if I don't follow protical. 

It states that this issues is resolved, but I am still having issues with Microsoft Magnifier focusing on the caret in Firefox 4+. It will follow text editing well when the cursor is at the end of a section of text, but has issues when the cursor is anywhere else within the text. It TRIES to focus on the cursor, but is above the text by several lines. This occurs when you are as little as one character back from the end of the paragraph. Also, when trying to browse using the caret I experience the same issue. The magnifier focuses several lines above the caret. Any help would be appreciated. Thanks.
Comment 31 Jim Mathies [:jimm] 2012-01-26 14:24:10 PST
(In reply to kdubfreak from comment #30)
> First, I am new here and not a developer, so sorry if I don't follow
> protical. 
> 
> It states that this issues is resolved, but I am still having issues with
> Microsoft Magnifier focusing on the caret in Firefox 4+. It will follow text
> editing well when the cursor is at the end of a section of text, but has
> issues when the cursor is anywhere else within the text. It TRIES to focus
> on the cursor, but is above the text by several lines. This occurs when you
> are as little as one character back from the end of the paragraph. Also,
> when trying to browse using the caret I experience the same issue. The
> magnifier focuses several lines above the caret. Any help would be
> appreciated. Thanks.

What version of Firefox are you using? The fix here went out with Fx 6, which was released around 2011-08-16.
Comment 32 kdubfreak 2012-01-26 14:39:14 PST
I am using Firefox 9 and experience the problem with Windows XP at work and Windows 7 at home.
Comment 33 Jim Mathies [:jimm] 2012-01-26 15:01:06 PST
(In reply to kdubfreak from comment #32)
> I am using Firefox 9 and experience the problem with Windows XP at work and
> Windows 7 at home.

Can you file a new bug please with steps to reproduce, and please cc me (:jimm).
Comment 34 kdubfreak 2012-01-26 15:08:06 PST
(In reply to Jim Mathies [:jimm] from comment #33)
> (In reply to kdubfreak from comment #32)
> > I am using Firefox 9 and experience the problem with Windows XP at work and
> > Windows 7 at home.
> 
> Can you file a new bug please with steps to reproduce, and please cc me
> (:jimm).

Sure, it's my first time doing so, and I'll need to read up on the procedures and whatnot. Heading offline now. Will do so tomorrow and cc you.

Note You need to log in before you can comment on or make changes to this bug.