Greg Amerson wrote:

Neil wrote:

Greg Amerson wrote:

When the editor is loaded, it overrides the radio,checkbox,select elements so that they don't generate any UI events like click, keypress. As it turns out this also disables DOM mutation events for these elements. The file I had to modify was /res/EditorOverride.css for those who are interested. The rule was -moz-user-input: none !important for input and select elements.

But I bet your problem will come back as soon as you set disabled="true" on your form elements.

You are correct. I found the CSS entry in /res/forms.css that seems to be related.

input[disabled],
textarea[disabled],
option[disabled],
optgroup[disabled],
select[disabled] {
  -moz-user-input: disabled;
  -moz-user-focus: ignore;
  color: GrayText;
  background-color: ThreeDFace;
  cursor: inherit;
}

Before to reenable the DOM mutation events on radio,checkbox,select, I just had to comment out the -moz-user-input: none, property. However, this time when I comment out the -moz-user-input: disabled, the disabled inputs still don't fire Mutation events. But I'm not so sure that this CSS rule in forms.css is actually doing anything. When I changed the background-color and color properties to some other color nothing changed in the editor when I loaded a page with a <input disabled>. No matter what colors I change these to, the input looks the same. So is this entry in forms.css really doing anything?

There's another entry in forms.css that sets -moz-appearance on inputs, this makes them use OS theming. I had thought that the theming glue was supposed to detect CSS overrides on form controls but maybe I was incorrect.

The reason that events don't fire on disabled form controls is that apparently for backwards compatibility the form control event code checks for both the CSS style and the DOM attribute and if either is set then events simply do not occur. As you can imagine this also causes problems for Mozilla Composer and NVu.

--
Warning: May contain traces of nuts.
_______________________________________________
dev-tech-editor mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-editor

Reply via email to