Left/Right Arrow keys in text input do not work if element is bound to XBL bindings

NEW
Unassigned

Status

()

Core
Layout: Form Controls
14 years ago
9 years ago

People

(Reporter: alex, Unassigned)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040803
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040803

For the HTML input element of type "text", the left/right arrow keys do not work
(i.e. do not move the cursor) if the element is bound to a XBL binding via CSS.

If the binding is removed, it works without problem.

Reproducible: Always
Steps to Reproduce:
1. Develop a CSS that defines a new style, say 'integer' with -moz-binding:
url(bindings.xml#integer)
2. Develop the file bindings.xml with binding id=integer. Add some handlers in
the binding. Actually what handlers you add does not affect the reproduction of
the problem
3. Develop a HTML page that links to the CSS and uses a input/text element with
class=integer. 
4. Try to type something in the text box and you can try to use the left/right
arrow keys. The cursor simply does not move.
5. Remove the class attribute, then try again and left/right arrow keys should
work now

Actual Results:  
The cursor simply does not move in step 4.
The cursor moves accordingly in step 5.


Expected Results:  
The cursor should move in both step 4 and 5
(Reporter)

Comment 1

14 years ago
Created attachment 156495 [details]
Sample CSS/HTML/XML to reproduce the problem

Comment 2

14 years ago
The problem is that in the resource://gre/res/forms.css is a rule 

input {
  -moz-binding:
url("resource://gre/res/builtin/platformHTMLBindings.xml#inputFields");
}

which add keyboard functionality to the input field. Element can have only one
attached binding. So when you are adding your bindings.xml#integer it overwrites
the general binding before.

Binding can be extended, so put in your bindings.xml declaration of the
extending - and all will go well:
  <binding id="integer"
extends="resource://gre/res/builtin/platformHTMLBindings.xml#inputFields"> 

AHA>Please, close this. 
Yes, but is it desirable to be using CSS as the mechanism for hooking up the key
events here?
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
Confirming so Gerv will leave this alone...
Status: UNCONFIRMED → NEW
Ever confirmed: true
You need to log in before you can comment on or make changes to this bug.