[whatwg] Suggestion for Menus in Web Forms 2.0

Given that I came up with the XUL syntax for menus, popups and context 
menus, I am aware of how it works. ;)

I do agree with you and hope that most of the XUL model for menus (with 
some of it being specified in CSS so that the exact tag names are not 
as important) can be standardized as part of Web Apps 1.0 (and possibly 
CSS3 in the W3C).

dave

On Jun 24, 2004, at 3:41 AM, Matthew Raymond wrote:

> David Hyatt wrote:
>
>> Note that there are really two kinds of menus... DHTML popup menus 
>> that should support CSS styles and be similar to DHTML menus on the 
>> Web today
>
>   It's hard to tell by the structure of your email, but I think you 
> mean that the two kinds of menus are standard menus and popup menus. 
> It should be noted that my previous sample code did not take popup 
> menus into consideration. To be honest, I kinda like the way XUL does 
> popup menus. In XUL, everything's done in XML. Here's an example I 
> stole from XULPlanet:
>
> -----------------------
>
> <popupset>
>   <popup id="clipmenu">
>     <menuitem label="Cut"/>
>     <menuitem label="Copy"/>
>     <menuitem label="Paste"/>
>   </popup>
> </popupset>
>
> <box context="clipmenu">
>   <description value="Context click for menu"/>
> </box>
>
> -----------------------
>
>    I have a slightly simpler idea, which I'll come to in a moment.
>
>> (I believe these should be specifiable just on <ul>/<li> entirely 
>> using CSS, e.g., with new display types).
>
>    I presume you mean using pure CSS menus in combination with Dean 
> Edwards' IE7.
>
>    [Matthew thinks about it for a moment...]
>
>    Yeah, I'll buy that. It doesn't provide a solution for keyboard 
> shortcuts and the lot, but then you'd have to deal with conflicts with 
> the browser menus anyway. The only problem here is that we'd still 
> need Javascript and DOM to get popups working. In that regard, I have 
> the following idea:
>
> -----------------------
>
> <div style="display: none; margins: 0px">
>   <div id="myContextMenu">
>     ...Menu Stuff...
>   </div>
> </div>
>
> <span context="myContextMenu">Hello World!</span>
>
> -----------------------
>
>    The way this works is simple. When you right-click (or whatever 
> click you use to get a context menu in your OS) anywhere inside the 
> <span> element, the element with the ID specified in the context 
> attribute temporarily becomes the child of the <span>. When the 
> temporary child element is clicked or looses focus, it's automatically 
> returned to its original parent. The context attribute could be 
> specified in just about any element and would work in a similar way. 
> If someone tries to use this feature maliciously to block access to 
> the browser context menus, the user could simply use popup blocking to 
> disable the context attribute.
>

Received on Thursday, 24 June 2004 10:57:58 UTC