Re: Click event doesn't fire for select, radio and checkbox

Laurent Jouanneau <[email protected]>
Newsgroups gmane.comp.mozilla.devel.editor
Message-ID <[email protected]>
[email protected] wrote:
> On Jul 8, 8:45 am, Laurent Jouanneau <[email protected]> wrote:
>> Hello,
>>
>> [email protected] wrote:
>>> These form elements don't generate click and keypress event in editor.
>>> It looks like the behavior is related to "-moz-user-input: none" rule
>>> in EditorOverride.css. If I remove this line, the events will generate
>>> fine. However, select will show the dropdown once clicked and radio/
>>> checkbox will show their state, which is not desired for editor. My
>>> question is how to prevent the dropdown/state from showing OR how to
>>> keep the rule intact and still receive click and keypress events?
>> Which form elements ? which checkbox/radio/select do you talk about ? in
>> an edited document ? If yes, I don't understand why do you want to
>> receive events from elements which are inside an edited document...
>>
>>
>>
>>> It looks like NVU was able to do it. I couldn't figure it out its
>>> mechanism. Can anyone shed some light? Thanks a lot!
>> Nvu is based on a very old version of Gecko :-)
>>
>> LaurentJ
> 
> Yes, they are in an edited document. If you are just talking about
> adding and deleting the checkbox/radio/select, then it shouldn't
> matter whether they fire events or not. However, imagine if you need
> to change the attribute and/or style of those elements. How will you
> do it? If I were the user, I would do it by double clicking or right
> clicking on it. Other form elements are fine (well, with the exception
> of those disabled ones:-) except for these three.
> 
> Nvu has its own mechanism of doing it, which is not from the Gecko
> engine, according to my observation. Would be great if I can pinpoint
> the spot in its code!
> 
> Feng


After some search, this is a bug : 
https://bugzilla.mozilla.org/show_bug.cgi?id=416766

In Nvu (gecko 1.7) and Seamonkey 1.0 (gecko 1.8), the behavior is ok : 
we can select the control. However, in Seamonkey 2.0a (gecko 1.9), we 
cannot. However, there isn't any difference in the value of the 
-moz-user-input property : there are same in the three software : 
"none". The only difference is on  the value of -moz-user-modify ; it is 
equal to "read-write" in Gecko 1.9 and "read-only" in Gecko <1.8. 
Perhaps this is the problem. Another hypothesis : there is a regression 
in the behavior of -moz-user-input:none.


Laurent.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.