[whatwg] HTML form controls inside of editable area

Ian Hickson ian at hixie.ch
Sun Aug 2 03:08:13 PDT 2009


On Thu, 23 Jul 2009, Alexander Surkov wrote:
> 
> HTML 5 contentEditable section doesn't define behaviour of HTML form 
> controls inside of editable area explicitly 
> (http://dev.w3.org/html5/spec/Overview.html#user-editing-actions). The 
> question is the following: is behaviour on keyboard or mouse interaction 
> with form controls inside of editable the same like it is for form 
> controls outside of editable area? So that for example if I click on 
> HTML button inside of editable area then will button be clicked and 
> onclick event handler be invoked? Or, for example, if HTML select is 
> focused and I press down arrow key then will selected option be changed? 
> It's obviously some keyboard shortcuts can have one meaning on focused 
> HTML element and another meaning in editable area. It's necessary to 
> define who wins. HTML 5 specification has words confirming implicitly 
> the idea HTML form controls inside of editable area should preserve 
> behaviour. These words are "When an editable form control is edited, the 
> changes must be reflected in both its current value and its default 
> value. for select elements it means updating the option elements' 
> defaultSelected DOM attribute as well as the selected DOM attribute" 
> which means user should be able to change selected option and therefore 
> it's reasonable to expect form control behaves as usually. Can I get 
> some clarification please?

The only thing the spec says that might make the behaviour of form 
controls different when editing than when not editing is the text you 
quote. Therefore, by definition, the form controls are unaffected (other 
than in that small way) by contenteditable.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list