From olav at olav.dk Sun May 1 02:18:45 2005 From: olav at olav.dk (=?ISO-8859-1?Q?Olav_Junker_Kj=E6r?=) Date: Sun, 01 May 2005 11:18:45 +0200 Subject: [whatwg] charset attribute of HTMLScriptElement In-Reply-To: <20050501122151.C07C.TATO@fureai.or.jp> References: <20050501122151.C07C.TATO@fureai.or.jp> Message-ID: <42749EF5.7050909@olav.dk> Wouldn't it be safer to declare the encoding in the js file itself? It could be in a magic comment at the start of the document: //@charset("utf8") Not very elegant, but less error prone than to specify the encoding everywhere the file is included. regards Olav Junker Kj?r Toshirou Takahashi wrote: > i hope to add the charset attribute to HTMLScriptElement, > on 2.12.1. The script element of The Web Applications 1.0 > http://whatwg.org/specs/web-apps/current-work/#the-script > > Because the person who made .js file doesn't know whether > the file is used with what charset all over the world. > > For instance, there is someone using the file written with utf-8 > on the page of shift_JIS and others. From ian at hixie.ch Sun May 1 06:03:48 2005 From: ian at hixie.ch (Ian Hickson) Date: Sun, 1 May 2005 13:03:48 +0000 (UTC) Subject: [whatwg] charset attribute of HTMLScriptElement In-Reply-To: <20050501122151.C07C.TATO@fureai.or.jp> References: <20050501122151.C07C.TATO@fureai.or.jp> Message-ID: On Sun, 1 May 2005, Toshirou Takahashi wrote: > > i hope to add the charset attribute to HTMLScriptElement, on 2.12.1. > > Because the person who made .js file doesn't know whether the file is > used with what charset all over the world. You can already do this -- just include the correct encoding information in the Content-Type header for the JS file, as in: Content-Type: text/javascript;charset=utf-8 -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From ian at hixie.ch Sun May 1 06:24:22 2005 From: ian at hixie.ch (Ian Hickson) Date: Sun, 1 May 2005 13:24:22 +0000 (UTC) Subject: [whatwg] [html5] 2.20.1. The datagrid element In-Reply-To: <42724E9C.80105@annevankesteren.nl> References: <42724E9C.80105@annevankesteren.nl> Message-ID: On Fri, 29 Apr 2005, Anne van Kesteren wrote: > > Some initial comments on possible problems I spotted. Thanks! > # Columns, rows, and cells can each have specific classes applied to > # them by the data provider. > > Classes is nowhere defined. Is this about the HTML CLASS attribute? If > so, could that be more clearly stated. If otherwise, could it be > elaborated for a bit to make it more understandable. Tried to elaborate. > # getRowCount(): The number of rows returned by the default data > # provider must be the number of tr elements that are children of tbody > # elements that are children of the table, if there are any tbody > # elements. If there are no tbody elements then the number of rows > # returned must be the number of tr elements that are children of the > # table. > > What happens here: > > > > > ... > > ... should it return 0? Or should it look for all descendents of TABLE > when there is neither a TBODY or TR child element. It returns 0, because the table contains neither tbody nor tr children. > # getColumnCount(): If the table has a thead element child, and the > # first such element has a tr element child, then the number of columns > # returned by the default data provider must be the number of th > # element children in the first such tr element, if there are any such > # th elements. > > This 'messes up' perfectly valid tables like: > >
> > > >
Male > Female >
Alcoholic > Suicidel > ... > > ... no? As the spec says: The colspan and rowspan attributes are ignored by this algorithm. Datagrids in common GUIs aren't capable of complex column captions like the above. How would you change the spec to work with the above? > # getCaptionText(i): If the table has no thead element child, or if its > # first thead element child has no tr element child, the default data > # provider must return the empty string for all captions. Otherwise, > # the value of the textContent attribute of the ith th element child > # of the first tr element child of the first thead element child of the > # table element must be returned. If there is no such th element, the > # empty string must be returned. > > How about trying to select the value of the CAPTION element[1] first? > The same might apply to getCaptionClasses(i, classes). The caption element gives the table's caption, not a column's caption. > By the way, it would make more sense to say: > > > > ... and that it then applies to all columns. Yeah, this is one of the things I was wondering about. The problem there is that it would only make sense for one of the cases, not the others. As a compromise I've made the spec look at the class attribute of the element and if that says sortable, use that. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From fora at annevankesteren.nl Sun May 1 10:36:45 2005 From: fora at annevankesteren.nl (Anne van Kesteren) Date: Sun, 01 May 2005 19:36:45 +0200 Subject: [whatwg] [html5] 2.20.1. The datagrid element In-Reply-To: References: <42724E9C.80105@annevankesteren.nl> Message-ID: <427513AD.7020907@annevankesteren.nl> Ian Hickson wrote: >> What happens here: >> >> [snip] > > It returns 0, because the table contains neither tbody nor tr > children. I was wondering if that was desired. >> This 'messes up' perfectly valid tables like: >> >> [snip] >> >> ... no? > > As the spec says: The colspan and rowspan attributes are ignored by > this algorithm. > > Datagrids in common GUIs aren't capable of complex column captions > like the above. How would you change the spec to work with the above? Don't check THEAD for such data. And also, perhaps it would be useful to check COLGROUP and COL elements first... -- Anne van Kesteren From fora at annevankesteren.nl Sun May 1 10:39:47 2005 From: fora at annevankesteren.nl (Anne van Kesteren) Date: Sun, 01 May 2005 19:39:47 +0200 Subject: [whatwg] charset attribute of HTMLScriptElement In-Reply-To: <42749EF5.7050909@olav.dk> References: <20050501122151.C07C.TATO@fureai.or.jp> <42749EF5.7050909@olav.dk> Message-ID: <42751463.4020207@annevankesteren.nl> ? wrote: > Wouldn't it be safer to declare the encoding in the js file itself? > It could be in a magic comment at the start of the document: > //@charset("utf8") > Not very elegant, but less error prone than to specify the encoding > everywhere the file is included. You really want to use the BOM of UTF-8 instead of this I guess. -- Anne van Kesteren From ian at hixie.ch Sun May 1 12:22:07 2005 From: ian at hixie.ch (Ian Hickson) Date: Sun, 1 May 2005 19:22:07 +0000 (UTC) Subject: [whatwg] charset attribute of HTMLScriptElement In-Reply-To: <42751463.4020207@annevankesteren.nl> References: <20050501122151.C07C.TATO@fureai.or.jp> <42749EF5.7050909@olav.dk> <42751463.4020207@annevankesteren.nl> Message-ID: On Sun, 1 May 2005, Anne van Kesteren wrote: > > You really want to use the BOM of UTF-8 instead of this I guess. See http://www.ietf.org/internet-drafts/draft-hoehrmann-script-types-02.txt -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From ian at hixie.ch Sun May 1 12:24:34 2005 From: ian at hixie.ch (Ian Hickson) Date: Sun, 1 May 2005 19:24:34 +0000 (UTC) Subject: [whatwg] [html5] 2.20.1. The datagrid element In-Reply-To: <427513AD.7020907@annevankesteren.nl> References: <42724E9C.80105@annevankesteren.nl> <427513AD.7020907@annevankesteren.nl> Message-ID: On Sun, 1 May 2005, Anne van Kesteren wrote: > > > > It returns 0, because the table contains neither tbody nor tr > > children. > > I was wondering if that was desired. It was intended. Whether it is desired or not, I am not 100% sure. I'm open to alternate algorithms. > > As the spec says: The colspan and rowspan attributes are ignored by > > this algorithm. > > > > Datagrids in common GUIs aren't capable of complex column captions > > like the above. How would you change the spec to work with the above? > > Don't check THEAD for such data. This would mean having to do a search of every element in the before knowing whether to use it or not. This would be very bad for performance. Also, it's unclear to me what you would look for -- colspan attributes with values that don't convert to numeric 1? > And also, perhaps it would be useful to check COLGROUP and COL elements > first... Check them for what? -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From fora at annevankesteren.nl Sun May 1 12:28:21 2005 From: fora at annevankesteren.nl (Anne van Kesteren) Date: Sun, 01 May 2005 21:28:21 +0200 Subject: [whatwg] [html5] 2.20.1. The datagrid element In-Reply-To: References: <42724E9C.80105@annevankesteren.nl> <427513AD.7020907@annevankesteren.nl> Message-ID: <42752DD5.4070509@annevankesteren.nl> Ian Hickson wrote: > It was intended. Whether it is desired or not, I am not 100% sure. > I'm open to alternate algorithms. I was thinking about checking descendents instead of children as last option. Not sure how that is for performance though. Perhaps the specification should be updated after real world problems have occured with the current specification instead of thinking about real world problems that might come to exist. >>> As the spec says: The colspan and rowspan attributes are ignored >>> by this algorithm. >>> >>> Datagrids in common GUIs aren't capable of complex column >>> captions like the above. How would you change the spec to work >>> with the above? >> >> Don't check THEAD for such data. > > This would mean having to do a search of every element in the > before knowing whether to use it or not. This would be very bad for > performance. Also, it's unclear to me what you would look for -- > colspan attributes with values that don't convert to numeric 1? This would mean checking the first child of the TBODY element for the amount of TD children it has. Not? -- Anne van Kesteren From ian at hixie.ch Sun May 1 13:02:40 2005 From: ian at hixie.ch (Ian Hickson) Date: Sun, 1 May 2005 20:02:40 +0000 (UTC) Subject: [whatwg] [html5] 2.20.1. The datagrid element In-Reply-To: <42752DD5.4070509@annevankesteren.nl> References: <42724E9C.80105@annevankesteren.nl> <427513AD.7020907@annevankesteren.nl> <42752DD5.4070509@annevankesteren.nl> Message-ID: On Sun, 1 May 2005, Anne van Kesteren wrote: > > I was thinking about checking descendents instead of children as last > option. Not sure how that is for performance though. Perhaps the > specification should be updated after real world problems have occured > with the current specification instead of thinking about real world > problems that might come to exist. Yeah. (You'd also get into problems with nested tables, etc.) > > > > As the spec says: The colspan and rowspan attributes are ignored > > > > by this algorithm. > > > > > > > > Datagrids in common GUIs aren't capable of complex column captions > > > > like the above. How would you change the spec to work with the > > > > above? > > > > > > Don't check THEAD for such data. > > > > This would mean having to do a search of every element in the > > before knowing whether to use it or not. This would be very bad for > > performance. Also, it's unclear to me what you would look for -- > > colspan attributes with values that don't convert to numeric 1? > > This would mean checking the first child of the TBODY element for the > amount of TD children it has. Not? Oh you want to use the tbody for the cell count and the thead for the captions? I guess we could do that. It makes it simpler. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From tato at fureai.or.jp Sun May 1 18:54:01 2005 From: tato at fureai.or.jp (Toshirou Takahashi) Date: Mon, 02 May 2005 10:54:01 +0900 Subject: [whatwg] charset attribute of HTMLScriptElement In-Reply-To: References: <20050501122151.C07C.TATO@fureai.or.jp> Message-ID: <20050502105100.96C5.TATO@fureai.or.jp> Ian Hickson wrote: > On Sun, 1 May 2005, Toshirou Takahashi wrote: > > > > i hope to add the charset attribute to HTMLScriptElement, on 2.12.1. > > > > Because the person who made .js file doesn't know whether the file is > > used with what charset all over the world. > > You can already do this -- just include the correct encoding information > in the Content-Type header for the JS file, as in: > > Content-Type: text/javascript;charset=utf-8 It is a good method. I also agree and I can do. However, how do you do when the user cannot use cgi , .htaccess etc ? Many users can not necessarily use cgi etc , and cannot make .htaccess at for instance, many rental servers... Regards -- Toshirou Takahashi From ian at hixie.ch Sun May 1 19:12:59 2005 From: ian at hixie.ch (Ian Hickson) Date: Mon, 2 May 2005 02:12:59 +0000 (UTC) Subject: [whatwg] charset attribute of HTMLScriptElement In-Reply-To: <20050502101051.96BE.TATO@fureai.or.jp> References: <20050501122151.C07C.TATO@fureai.or.jp> <20050502101051.96BE.TATO@fureai.or.jp> Message-ID: On Mon, 2 May 2005, Toshirou Takahashi wrote: > > > > You can already do this -- just include the correct encoding > > information in the Content-Type header for the JS file, as in: > > > > Content-Type: text/javascript;charset=utf-8 > > It is a good method. I also agree and I can do. > > However, how do you do when the user cannot use cgi , .htaccess etc ? When using systems that are unable of basic compliance with existing Web standards, it is possible to include the character encoding in the "type" attribute of the However, it should be noted that in most cases HTTP defines that the information contained in that attribute is overridden by the information in the HTTP headers and thus this is not a reliable method (and would not work, for instance, if the server sent back contradictory metadata). -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From tato at fureai.or.jp Sun May 1 22:37:52 2005 From: tato at fureai.or.jp (Toshirou Takahashi) Date: Mon, 02 May 2005 14:37:52 +0900 Subject: [whatwg] charset attribute of HTMLScriptElement In-Reply-To: References: <20050502101051.96BE.TATO@fureai.or.jp> Message-ID: <20050502143421.96D8.TATO@fureai.or.jp> oo... sory there was no Cc: whatwg at whatwg.org send again. -- hi Ian : > On Mon, 2 May 2005, Toshirou Takahashi wrote: > > > > > > You can already do this -- just include the correct encoding > > > information in the Content-Type header for the JS file, as in: > > > > > > Content-Type: text/javascript;charset=utf-8 > > > > It is a good method. I also agree and I can do. > > > > However, how do you do when the user cannot use cgi , .htaccess etc ? > > When using systems that are unable of basic compliance with existing Web > standards, it is possible to include the character encoding in the "type" > attribute of the I also know the method. However, to our regret, I have not seen the good operation on any browser... Charset atribute functions well of course. [ Test ] http://jsgt.org/whatwg/wa102121script/ --------------------------------------------------------------------- ToUtf8FromSjisByType.html Win IE6 ng Firefox0.8 ng Opera8.0 ng --------------------------------------------------------------------- ToSjisFromUtf8ByType.html Win IE6 ng Firefox0.8 ng Opera8.0 ng --------------------------------------------------------------------- ToUtf8FromSjisByCharset.html Win IE6 ok Firefox0.8 ok Opera8.0 ok --------------------------------------------------------------------- ToSjisFromUtf8ByCharset.html Win IE6 ok Firefox0.8 ok Opera8.0 ok Thanx, -- Toshirou Takahashi From tato at fureai.or.jp Mon May 2 02:41:00 2005 From: tato at fureai.or.jp (Toshirou Takahashi) Date: Mon, 02 May 2005 18:41:00 +0900 Subject: [whatwg] charset attribute of HTMLScriptElement In-Reply-To: <20050502143421.96D8.TATO@fureai.or.jp> References: <20050502143421.96D8.TATO@fureai.or.jp> Message-ID: <20050502182456.04C1.TATO@fureai.or.jp> The test of Mac and Linux was added. [ Test ] http://jsgt.org/whatwg/wa102121script/ ok == success ng == failure ===================================================================== // type attribute // // --------------------------------------------------------------------- ToUtf8FromSjisByType.html Win IE6 ng Firefox0.8 ng Opera8.0 ng Mac IE5.2 ng Safari1.25 ng Linux Konqueror3.3 ng --------------------------------------------------------------------- ToSjisFromUtf8ByType.html Win IE6 ng Firefox0.8 ng Opera8.0 ng Mac IE5.2 ng Safari1.25 ng Linux Konqueror3.3 ng ===================================================================== // charset attribute // // --------------------------------------------------------------------- ToUtf8FromSjisByCharset.html Win IE6 ok Firefox0.8 ok Opera8.0 ok Mac IE5.2 ok Safari1.25 ok Linux Konqueror3.3 ok --------------------------------------------------------------------- ToSjisFromUtf8ByCharset.html Win IE6 ok Firefox0.8 ok Opera8.0 ok Mac IE5.2 ok Safari1.25 ok Linux Konqueror3.3 ok Thanx, -- Toshirou Takahashi From fora at annevankesteren.nl Mon May 2 13:44:02 2005 From: fora at annevankesteren.nl (Anne van Kesteren) Date: Mon, 02 May 2005 22:44:02 +0200 Subject: [whatwg] [html5] 9.2. Focus Message-ID: <42769112.9040209@annevankesteren.nl> I would like the specification to say more explicitly which value of the TABINDEX attribute is the default value. For example, when I want the LI attribute of my drop down menu to be tabable and don't want to override the normal tabbing order there needs to be some kind of default value. I guess this is '0', but that should be more clear. (It could also be stated that elements through which can be tabbed by defaullt have that value. Either way is fine, but perhaps both should be mentioned...) As TABINDEX is likely to affect if elements will match :enabled and :disabled that should be stated as well. Also, what is the difference between '-1' and '-10000' as values for the TABINDEX attribute? It might make sense to say something along the lines of "any negative value is treated the same". It is unclear from the specification what it means when one element has '1' and another has '4'. I might have missed it but I don't see which is supposed to be more important. I was also wondering about inheritance. -- Anne van Kesteren From peter at opera.com Mon May 2 23:27:15 2005 From: peter at opera.com (Peter Karlsson) Date: Tue, 3 May 2005 07:27:15 +0100 (CET) Subject: [whatwg] Re: charset attribute of HTMLScriptElement In-Reply-To: References: <20050501122151.C07C.TATO@fureai.or.jp> <20050502101051.96BE.TATO@fureai.or.jp> Message-ID: Ian Hickson on 2005-05-02: > When using systems that are unable of basic compliance with existing Web > standards, it is possible to include the character encoding in the "type" > attribute of the Is simply bad, there's no rationale for all that extra indirection, can I also remind you once again that the WHAT-WG individual has stated: "Creating a 3D markup language is somewhat outside the purview of this working group, though." your explanation of loading these external files, would require you to create just such a markup language. This is the problem I have, without external files of any sort, then a 3D api is pretty useless, the fact it's been trivial in IE since 1997, yet hasn't been used, I think makes that clear. > If by declarative you mean like X3D, then WHATWG clearly shouldn't > add such markup to HTML because it would duplicate the work of another > group unnecessarily. Just like it's not necessary to embed jpeg's inside HTML documents to get images in them, it's not necessary to embed 3D markup inside HTML documents to get 3D images. > If I'm reading this right, you're saying that no one uses > DirectAnimation, and perhaps 3D in general, so why introduce a > potentially competing standard when there's no real demand for the > original? I'm asking for you to justify your use cases, for example implement a mock one in some pseudo code, you will see very rapidly that for any of them to work they require externally defined 3D models, defining a 3D model language is "somewhat outside the purview of this working group". If you discover that you don't, then I will gladly concede that your use-cases are practical. As to the DirectAnimation, one of the "fundamental principles" of the WHAT-WG is "features should be implementable using behaviors, scripting, and style sheets in IE6 today" the only way to do that with 3D is to use a DirectAnimation layer, because of that, it makes complete sense to just take the DirectAnimation API as a whole. Jim. From judell at gmail.com Tue May 3 08:10:57 2005 From: judell at gmail.com (Jon Udell) Date: Tue, 3 May 2005 11:10:57 -0400 Subject: [whatwg] password option for window.prompt? Message-ID: <94a59c7d0505030810448c2a33@mail.gmail.com> what: a password option for window.prompt why: http://weblog.infoworld.com/udell/2005/05/03.html#a1227 - Jon Udell From jim.ley at gmail.com Wed May 4 08:50:27 2005 From: jim.ley at gmail.com (Jim Ley) Date: Wed, 4 May 2005 16:50:27 +0100 Subject: [whatwg] password option for window.prompt? In-Reply-To: <94a59c7d0505030810448c2a33@mail.gmail.com> References: <94a59c7d0505030810448c2a33@mail.gmail.com> Message-ID: <851c8d31050504085064577fce@mail.gmail.com> On 5/3/05, Jon Udell wrote: > what: a password option for window.prompt > > why: http://weblog.infoworld.com/udell/2005/05/03.html#a1227 Modal dialogs prompt/alert/confirm etc. are bad from an accessibility context, and should not be used in real applications. As what you want is not part of a web application, but something specific to your browsers chrome, request something from them, it should not be standardised anywhere else. Jim. From fantasai.lists at inkedblade.net Wed May 4 12:36:59 2005 From: fantasai.lists at inkedblade.net (fantasai) Date: Wed, 04 May 2005 15:36:59 -0400 Subject: [whatwg] Re: Autodiscovery In-Reply-To: <0ddadc99a41ce83550ede71051ea02ae@iki.fi> References: <42784696.1060409@gmail.com> <31750ab13687e0b55c9eb9cdd2ffdd66@iki.fi> <14be96d305050323162633186b@mail.gmail.com> <0ddadc99a41ce83550ede71051ea02ae@iki.fi> Message-ID: <4279245B.4020907@inkedblade.net> Henri Sivonen wrote: > > On May 4, 2005, at 09:16, Mark Pilgrim wrote: > >> Then I'm confused as to why you can't just release running code that >> hard-codes rel="alternate". You know, like people have already done. > > Sure you can. ("Can" in the sense that it is possible.) > > However, when other things are equal, I think misusing an existing > relation (feed usually is not a proper alternate representation) is > worse than specifying a new one without all the profile fluff. > > Still, I am well aware that the other things are not equal in this case > (ie. there is deployed code), which is why I was not arguing in favor of > rel='feed' per se, but pointing out that the particular reasoning > against it did not hold water, IMO. It is the case that many, if not most, autodiscovery links *are* linking to valid alternates of the current page. Taking into account the wide use of the rel="alternate" type="application/atom+xml" combination, the spec could be written to - specify that any link with rel="feed" and type="application/atom+xml" indicates an autodiscoverable Atom feed - specify that UAs MAY also recognize the rel="alternate" and type="application/atom+xml" combination as an autodiscoverable Atom feed even if 'feed' is not among the rel values, - but specify that authors SHOULD NOT (or MUST NOT) leave out the 'feed' value - recommend that links that do indicate a feed version of the current HTML page SHOULD link to that feed with both link types Blogging software is a fast-moving industry. If the draft editor makes this change and notifies the community, I suspect it will not be long before most software supports both syntaxes. ~fantasai From ian at hixie.ch Wed May 4 15:51:17 2005 From: ian at hixie.ch (Ian Hickson) Date: Wed, 4 May 2005 22:51:17 +0000 (UTC) Subject: [whatwg] Drag and drop in HTML5 Message-ID: I am currently working on trying to specify IE's (and now Safari's) drag and drop API. In IE, drag and drop is basically only supported for WYSIWYG editing use cases: you can drag selections, images, and URLs. That's fine. Those are a major use case which we need to support, and the API is designed in a way that makes it easy to specify independent of media or platform (the names may be media-specific, but, like the "click" event, that's just to make developing for the platform easy, it's not actually stopping those events from being used for slightly different purposes in other media). In Safari, you can also drag entire blocks. This is done by using a CSS property, -khtml-user-drag I believe, which can take values that disallow dragging, enable selection and image dragging, and enable whole-element dragging. Now for Safari's use case this makes sense. Their target was platform-dependent, media-specific widgets, with accessibility needs addressed explicitly in the widget's code. However, from an HTML point of view, it doesn't make sense. Having a style property control application behaviour is wrong -- the fact that something is draggable isn't going to change depending on what the skin is. It's not even going to change based on the media -- something that's draggable (via a mouse) on a visual UA is still going to be draggable when the user is using an interactive aural agent (albeit with a radically different interaction model probably involving explicitly picking two elements and saying that the first is to be dragged to the second). So there is currently no whole-element drag-and-drop API that we can conveniently re-use. There are use cases though: - Dragging items around in a visual representation. You drag little ships in a game showing a visual representation of the game board (for example, I really want to drag the fleet icons in VoidWars www.voidwars.com). I could see you dragging icons around the map in Google Maps. -- here it seems like we may want a specific element that represents a "thing". There's more to this case than just dragging and dropping -- there is a media-dependent aspect as well. You're dropping to a specific coordinate. Non-visual media are SOL if this is the only way to interact with the application. - Dragging items to classify them. I could see you dragging items from a list of items in a shopping mall interface to a virtual shopping cart, or dragging them out from there to a wishlist. Another example of this is dragging cards (between piles) in a card game. -- here it seems that we have a structure where one element contains a set of other elements all of which are draggable, and all of which can be dragged to specific other elements. Would it be enough to just mark elements as drag-item-sources and drag-targets and say that all the elements in d-i-sources can be dragged to d-targets? - Dragging items around a list view or between list views. -- here it seems like should just natively support drag and drop, so we don't need much more here. What other use cases are there? Are there any requirements I'm missing? -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From dean at edwards.name Wed May 4 16:12:40 2005 From: dean at edwards.name (Dean Edwards) Date: Thu, 05 May 2005 00:12:40 +0100 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: References: Message-ID: <427956E8.3090708@edwards.name> Ian Hickson wrote: > I am currently working on trying to specify IE's (and now Safari's) drag > and drop API. > > However, from an HTML point of view, it doesn't make sense. Having a style > property control application behaviour is wrong -- the fact that something > is draggable isn't going to change depending on what the skin is. It's not > even going to change based on the media -- something that's draggable (via > a mouse) on a visual UA is still going to be draggable when the user is > using an interactive aural agent (albeit with a radically different > interaction model probably involving explicitly picking two elements and > saying that the first is to be dragged to the second). > > So there is currently no whole-element drag-and-drop API that we can > conveniently re-use. Controlling behavior through CSS is OK if the what you are changing is CSS. It seems there two kinds of drag/drop. One kind affects the DOM, e.g. changing the order of items in a list. The other kind affects CSS, e.g. dragging a window on screen. For a draggable window only the CSS "left" and "top" positions would be a affected. It would be difficult to specify this without CSS! Ideally, i'd like to do both. Use CSS to declare a draggable element and use HTML to declare a list that can be re-ordered. -dean From ian at hixie.ch Wed May 4 16:20:10 2005 From: ian at hixie.ch (Ian Hickson) Date: Wed, 4 May 2005 23:20:10 +0000 (UTC) Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: <427956E8.3090708@edwards.name> References: <427956E8.3090708@edwards.name> Message-ID: On Thu, 5 May 2005, Dean Edwards wrote: > > Controlling behavior through CSS is OK if the what you are changing is > CSS. > > It seems there two kinds of drag/drop. One kind affects the DOM, e.g. > changing the order of items in a list. The other kind affects CSS, e.g. > dragging a window on screen. For a draggable window only the CSS "left" > and "top" positions would be a affected. It would be difficult to > specify this without CSS! > > Ideally, i'd like to do both. Use CSS to declare a draggable element and > use HTML to declare a list that can be re-ordered. True. I am primarily (exclusively?) concerned with "meaningful" dragging-and-dropping here. Resizing or moving things that aren't otherwise affecting the logic of the application is out of scope. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From hyatt at apple.com Wed May 4 16:58:01 2005 From: hyatt at apple.com (David Hyatt) Date: Wed, 4 May 2005 16:58:01 -0700 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: <427956E8.3090708@edwards.name> References: <427956E8.3090708@edwards.name> Message-ID: Safari also supports a :-khtml-dragging pseudo-class (like :hover or :active) that is used to render the element while it is being dragged. This allows you to do dynamic drag effects solely using CSS, is purely presentational, and so IMO does belong in CSS. I personally think controlling focusability, dragging, selection and editing from CSS is a done deal. Safari and Dashboard already support user-drag, user-select and user-modify. Mozilla supports user-focus and user-select. We plan to add user-focus support to Safari. dave On May 4, 2005, at 4:12 PM, Dean Edwards wrote: > Ian Hickson wrote: > >> I am currently working on trying to specify IE's (and now >> Safari's) drag and drop API. >> However, from an HTML point of view, it doesn't make sense. Having >> a style property control application behaviour is wrong -- the >> fact that something is draggable isn't going to change depending >> on what the skin is. It's not even going to change based on the >> media -- something that's draggable (via a mouse) on a visual UA >> is still going to be draggable when the user is using an >> interactive aural agent (albeit with a radically different >> interaction model probably involving explicitly picking two >> elements and saying that the first is to be dragged to the second). >> So there is currently no whole-element drag-and-drop API that we >> can conveniently re-use. >> > > Controlling behavior through CSS is OK if the what you are changing > is CSS. > > It seems there two kinds of drag/drop. One kind affects the DOM, > e.g. changing the order of items in a list. The other kind affects > CSS, e.g. dragging a window on screen. For a draggable window only > the CSS "left" and "top" positions would be a affected. It would be > difficult to specify this without CSS! > > Ideally, i'd like to do both. Use CSS to declare a draggable > element and use HTML to declare a list that can be re-ordered. > > -dean > > From ian at hixie.ch Wed May 4 17:19:21 2005 From: ian at hixie.ch (Ian Hickson) Date: Thu, 5 May 2005 00:19:21 +0000 (UTC) Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: References: <427956E8.3090708@edwards.name> Message-ID: On Wed, 4 May 2005, David Hyatt wrote: > > Safari also supports a :-khtml-dragging pseudo-class (like :hover or > :active) that is used to render the element while it is being dragged. > This allows you to do dynamic drag effects solely using CSS, is purely > presentational, and so IMO does belong in CSS. Yeah, that belongs in CSS. > I personally think controlling focusability, dragging, selection and > editing from CSS is a done deal. Safari and Dashboard already support > user-drag, user-select and user-modify. Mozilla supports user-focus and > user-select. We plan to add user-focus support to Safari. Whether an element (other than something purely presentational like a window) is draggable, whether an element is selectable, and whether an element is modifiable or editable are quite clearly not presentational aspects. They don't belong in the presentational layer, especially since that layer can be turned off. IMHO. As far as editing goes, contentEditable="" is the way we're going at the moment, I think. Focusable is probably going to be tabindex="". Selectable hasn't yet been discussed (I could be convinced that that is presentational, actually). Draggable is clearly not presentational; my current thinking is something like contentDraggable="" or something. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From hyatt at apple.com Wed May 4 18:37:47 2005 From: hyatt at apple.com (Dave Hyatt) Date: Wed, 4 May 2005 18:37:47 -0700 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: References: <427956E8.3090708@edwards.name> Message-ID: <30CD83E0-321D-41D9-8850-334B3923DE00@apple.com> WinIE supports setting tabindex to -1 to make an element focusable via .focus(). dave On May 4, 2005, at 5:19 PM, Ian Hickson wrote: > On Wed, 4 May 2005, David Hyatt wrote: > >> >> Safari also supports a :-khtml-dragging pseudo-class (like :hover or >> :active) that is used to render the element while it is being >> dragged. >> This allows you to do dynamic drag effects solely using CSS, is >> purely >> presentational, and so IMO does belong in CSS. >> > > Yeah, that belongs in CSS. > > > >> I personally think controlling focusability, dragging, selection and >> editing from CSS is a done deal. Safari and Dashboard already >> support >> user-drag, user-select and user-modify. Mozilla supports user- >> focus and >> user-select. We plan to add user-focus support to Safari. >> > > Whether an element (other than something purely presentational like a > window) is draggable, whether an element is selectable, and whether an > element is modifiable or editable are quite clearly not presentational > aspects. They don't belong in the presentational layer, especially > since > that layer can be turned off. > > IMHO. > > As far as editing goes, contentEditable="" is the way we're going > at the > moment, I think. Focusable is probably going to be tabindex="". > Selectable hasn't yet been discussed (I could be convinced that > that is > presentational, actually). Draggable is clearly not presentational; my > current thinking is something like contentDraggable="" or something. > > -- > Ian Hickson U+1047E ) > \._.,--....,'``. fL > http://ln.hixie.ch/ U+263A /, _.. \ _ > \ ;`._ ,. > Things that are impossible just take longer. `._.-(,_..'-- > (,_..'`-.;.' > From ian at hixie.ch Thu May 5 00:25:21 2005 From: ian at hixie.ch (Ian Hickson) Date: Thu, 5 May 2005 07:25:21 +0000 (UTC) Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: <30CD83E0-321D-41D9-8850-334B3923DE00@apple.com> References: <427956E8.3090708@edwards.name> <30CD83E0-321D-41D9-8850-334B3923DE00@apple.com> Message-ID: On Wed, 4 May 2005, Dave Hyatt wrote: > > WinIE supports setting tabindex to -1 to make an element focusable via > .focus(). Yeah, that's already in the WHATWG draft actually (or something close to it, it's only a first draft right now). -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From kornel at ldreams.net Thu May 5 02:18:17 2005 From: kornel at ldreams.net (Kornel Lesinski) Date: Thu, 05 May 2005 10:18:17 +0100 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: References: Message-ID: On Wed, 04 May 2005 23:51:17 +0100, Ian Hickson wrote: > So there is currently no whole-element drag-and-drop API that we can > conveniently re-use. There are use cases though: As a web developer I'd like: - enabling/disabling dragging for each DOM element: foo.draggable = true; - event that "asks" if item can be dropped "here". Dragged item should fire events on elements it hovers (like onmouseover) and response to this event (preventDefault?) should control if mouse pointer looks 'forbidden' or 'normal' accordingly. foo.addEventListener('dragtarget',function(e) {if (this.isBusy) e.preventDefault();},false); If it can't be an event (above example doesn't look bulletproof to me), less convenient method like specifying if element is allowed target may be sufficient (foo.dragTarget = true) - 'item dropped' event fired on target element - :drag CSS pseudo-class is nice idea. There might be also :drag-target (:drag:target?) pseudo-class that styles elements that "agreed" to be drag target. :drag {opacity: 0.5;} :drag-target {outline: 2px dotted red;} There is use-case of reordering items, which means dragging items in between other items. That seems a bit more complex, and probably needs additional helper API. To implement this with simple interface I've proposed, events should be handled either by existing elements (like list items that compare their size and position of dragged element to decide whether element should be dropped before or after) or handled by container that would probably need to calculate positions of it's children and create new element to show drop target. Smooth Mac-like drag'n'drop can be implemented by animating drop target's padding/margin. So that's quite a bit of code that's going to be reinvented each time someone implements reordering. -- pozdrawiam, Kornel Lesinski From hallvord at hallvord.com Thu May 5 08:41:01 2005 From: hallvord at hallvord.com (Hallvord Reiar Michaelsen Steen) Date: Thu, 05 May 2005 17:41:01 +0200 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: Message-ID: <427A5AAD.8649.1B2E609@localhost> On 4 May 2005 at 22:51, Ian Hickson wrote: > - Dragging items to classify them. I could see you dragging items from > a list of items in a shopping mall interface to a virtual shopping > cart, or dragging them out from there to a wishlist. Another example of > this is dragging cards (between piles) in a card game. Or dragging E-mails to folders in a webmail service.. One of the issues here is that there ought to be a way to drag a collection of elements that aren't necessarily siblings in the DOM. Perhaps a way to specify a "drag-group" to say that certain elements considered draggable should be dragged together. A DragGroup object would be a sort of nodelist.. Perhaps something like "myDragGroup.add(this);" would be more logical? Or perhaps just assign a specific ID string..? -- Hallvord Reiar Michaelsen Steen http://www.hallvord.com/ From hallvord at hallvord.com Thu May 5 08:56:29 2005 From: hallvord at hallvord.com (Hallvord Reiar Michaelsen Steen) Date: Thu, 05 May 2005 17:56:29 +0200 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: <427A5AAD.8649.1B2E609@localhost> References: Message-ID: <427A5E4D.11753.1C10EEF@localhost> On 5 May 2005 at 17:41, Hallvord Reiar Michaelsen Steen wrote: > dragGroup = mailBucket; (Meant "this.dragGroup = mailBucket;". Sorry.) -- Hallvord Reiar Michaelsen Steen http://www.hallvord.com/ From olav at olav.dk Thu May 5 09:13:38 2005 From: olav at olav.dk (=?ISO-8859-1?Q?Olav_Junker_Kj=E6r?=) Date: Thu, 05 May 2005 18:13:38 +0200 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: References: <427956E8.3090708@edwards.name> Message-ID: <427A4632.9040700@olav.dk> Ian Hickson wrote: > Selectable hasn't yet been discussed (I could be convinced that that is > presentational, actually). I don't think it is. Consider selecting options in a select-control. This is clearly semantic information. How selection is performed (mouse click, tab to element and press space, shouting the label on the element) is media dependent. regards Olav Junker Kj?r From ian at hixie.ch Thu May 5 14:12:59 2005 From: ian at hixie.ch (Ian Hickson) Date: Thu, 5 May 2005 21:12:59 +0000 (UTC) Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: <427A5AAD.8649.1B2E609@localhost> References: <427A5AAD.8649.1B2E609@localhost> Message-ID: On Thu, 5 May 2005, Hallvord Reiar Michaelsen Steen wrote: > > One of the issues here is that there ought to be a way to drag a > collection of elements that aren't necessarily siblings in the DOM. > Perhaps a way to specify a "drag-group" to say that certain elements > considered draggable should be dragged together. > > > > A DragGroup object would be a sort of nodelist.. Perhaps something > like "myDragGroup.add(this);" would be more logical? Or perhaps just > assign a specific ID string..? Do you mean that instead of labelling each draggable element as draggable, you would instead add each draggable element to a list? -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From ian at hixie.ch Thu May 5 14:15:27 2005 From: ian at hixie.ch (Ian Hickson) Date: Thu, 5 May 2005 21:15:27 +0000 (UTC) Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: <427A4632.9040700@olav.dk> References: <427956E8.3090708@edwards.name> <427A4632.9040700@olav.dk> Message-ID: On Thu, 5 May 2005, Olav Junker Kj?r wrote: > Ian Hickson wrote: > > Selectable hasn't yet been discussed (I could be convinced that that is > > presentational, actually). > > I don't think it is. Consider selecting options in a select-control. > This is clearly semantic information. How selection is performed (mouse > click, tab to element and press space, shouting the label on the > element) is media dependent. I meant text selection. Marking an entire element as selected would be done the same way as marking an element as checked, as disabled, and so forth; namely, using an API that lets you specifically label elements as being in that state as in: myDiv.isSelected = true; ...or something like that. There is the (very poor) beginnings of such a proposal in the Web Controls draft at the moment. It's a custom controls issue, IMHO. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From hallvord at hallvord.com Thu May 5 14:40:35 2005 From: hallvord at hallvord.com (Hallvord Reiar Michaelsen Steen) Date: Thu, 05 May 2005 23:40:35 +0200 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: References: <427A5AAD.8649.1B2E609@localhost> Message-ID: <427AAEF3.3714.2FC15A4@localhost> On 5 May 2005 at 21:12, Ian Hickson wrote: > > Perhaps a way to specify a "drag-group" to say that certain elements > > considered draggable should be dragged together. > Do you mean that instead of labelling each draggable element as draggable, > you would instead add each draggable element to a list? I suppose the most powerful API might have both a "draggable" and a "dragGroup" property on nodes, but this may of course be too complex. * The "baseline" option is to support draggable=true or some equivalent and let user drag and drop one such item at a time. * One alternative is to say that all items with draggable=true always are dragged - it requires a bit more caution by the JS author and the user - * The third way would be a draggable node list *and* a draggable property. (Only a list is functionally same as the option above) This is the way I thought it might work: When a drag action starts on an element that has draggable set to true, the UA checks if the dragGroup property of the element is set. If it is set, it performs a "drag" action on all the elements that refer to the same drag group and have their draggable property set to true. A use case might be a complex web mail interface where you can drag both contacts and E-mails, and drag only those you select by checkboxes or by clicking on them. Such an interface requires that you can drag multiple items, and distinguish different groups of multiple items. It would be really neat to have a CSS-like inheritance for the dragGroup so that you could specify it once - say
[list of E-mails, for example using UL, LI and A markup]
and all child nodes would drag together if selected. :-) -- Hallvord Reiar Michaelsen Steen http://www.hallvord.com/ From ian at hixie.ch Thu May 5 14:54:19 2005 From: ian at hixie.ch (Ian Hickson) Date: Thu, 5 May 2005 21:54:19 +0000 (UTC) Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: <427AAEF3.3714.2FC15A4@localhost> References: <427A5AAD.8649.1B2E609@localhost> <427AAEF3.3714.2FC15A4@localhost> Message-ID: On Thu, 5 May 2005, Hallvord Reiar Michaelsen Steen wrote: > > [...] So to summarise, you want a way to make a drag operation initiated on one element cause a number of elements to simultaneously be dragged. I see the use for that. As far as the mail case goes, I would imagine that would be done via a which would support dragging natively, so that would be a different problem. But I could see it being possible for groups of DOM nodes as well. My proposal for doing that would be to have a way in ondragstart to say "...and by the way, also drag all these elements at the same time". As in: function dragStartHandler(e) { e.dataTransfer.addElement(e.target.nextSibling.nextSibling); } ...or something. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From bfults at gmail.com Fri May 6 00:48:52 2005 From: bfults at gmail.com (Brad Fults) Date: Fri, 6 May 2005 00:48:52 -0700 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: References: <427956E8.3090708@edwards.name> Message-ID: <1959130b050506004881807b9@mail.gmail.com> On 5/4/05, Ian Hickson wrote: > > As far as editing goes, contentEditable="" is the way we're going at the > moment, I think. Focusable is probably going to be tabindex="". > Selectable hasn't yet been discussed (I could be convinced that that is > presentational, actually). Draggable is clearly not presentational; my > current thinking is something like contentDraggable="" or something. I don't really see a case outside the datagrid dragging (which is handled elsewhere) where there would be a need to specify an element as draggable or as a drag target without scripting in drag behavior. In light of this, I don't see any reason to pollute the HTML namespace with more attributes (contentDraggable) when this will necessarily be a scripted event anyway. Please feel free to point out cases where another HTML attribute would have an advantage over a DOM property that could be set directly via script. As for the dragging event model for a single DOM element, I think the events outlined in the current draft of the spec are a good start. In addition, however, it would be nice to add some presentational niceties via CSS pseudo-classes. :draggable = DOM element that has .draggable=true (or whatever is decided on) :dragging = DOM element that is being dragged (perhaps opacity: 0.5) :dragging:droppable = DOM element that is being dragged and can be dropped over its current location :dragtarget / ? = container that allows for the current dragging element to be dropped upon it (border: 2px dotted red) :dragged = the original DOM element that was dragged, in its original position (it would be up to script to determine whether or not to remove it or whatever else) I think something along these lines is invaluable to a rich GUI interface. Drag groups could be specified by a simple NodeList that would be defined at dragstart. e.g. var elDrag = document.getElementById("mydragelement"); var myNodeList = []; myNodeList.push(document.getElementById("dragfriend1")); myNodeList.push(document.getElementById("dragfriend2")); // or just as easily: var myNodeList = document.getElementsByTagName("LI"); elDrag.addEventListener("dragstart", function(e) { e.dragNodes.appendChildren(myNodeList); return true; }, false); For the droppable model, it makes sense to have the drag target element specify either Elements or NodeLists that are droppable. e.g. var elDragTarget = document.getElementById("mydragtarget"); elDragTarget.addDroppable(elDrag); elDragTarget.addDroppable(myNodeList); Then the question comes about dragging a group of elements to a drag target which only has *some* of the dragged elements in its droppable list. Without thinking about it too much, I think this could be handled when the elements are dropped as such: elDrag.addEventListener("dragend", function(e) { // go through each dropped element and check if it's droppable on the drag target for (var i=0; i < e.dragNodes.length; i++) if ( !dragTarget.isDroppable(e.dragNodes[i]) ) alert("Unabled to drag "+e.dragNodes[i].id+" to "+dragTarget.id); // of course something more graceful than an alert could be done return true; }, false); Anyway, most of it is food for thought. -- Brad Fults NeatBox -------------- next part -------------- An HTML attachment was scrubbed... URL: From bfults at gmail.com Fri May 6 00:58:50 2005 From: bfults at gmail.com (Brad Fults) Date: Fri, 6 May 2005 00:58:50 -0700 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: <1959130b050506004881807b9@mail.gmail.com> References: <427956E8.3090708@edwards.name> <1959130b050506004881807b9@mail.gmail.com> Message-ID: <1959130b0505060058310f2bb4@mail.gmail.com> On 5/6/05, Brad Fults wrote: > > :draggable = DOM element that has .draggable=true (or whatever is decided > on) > :dragging = DOM element that is being dragged (perhaps opacity: 0.5) > :dragging:droppable = DOM element that is being dragged and can be dropped > over its current location > :dragtarget / ? = container that allows for the current dragging element > to be dropped upon it (border: 2px dotted red) > :dragged = the original DOM element that was dragged, in its original > position (it would be up to script to determine whether or not to remove it > or whatever else) > After thinking about it more, it seems that this list is incomplete. :dragtarget:droppable = the currently dragging element can be dropped over this element. (border: 2px dotted green) And instead, make :dragtarget generic for all drag targets for the currently dragging element. :dragtarget = a valid drag target for the currently dragging element--the dragging element is in this drag target's droppable list. (border: 2px solid blue) -- Brad Fults NeatBox -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian at hixie.ch Fri May 6 08:26:59 2005 From: ian at hixie.ch (Ian Hickson) Date: Fri, 6 May 2005 15:26:59 +0000 (UTC) Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: <1959130b050506004881807b9@mail.gmail.com> References: <427956E8.3090708@edwards.name> <1959130b050506004881807b9@mail.gmail.com> Message-ID: On Fri, 6 May 2005, Brad Fults wrote: > > I don't really see a case outside the datagrid dragging (which is handled > elsewhere) where there would be a need to specify an element as draggable or > as a drag target without scripting in drag behavior. You need to have something to decide if it is an element expecting to be dragged in its entirety or an element where only the selection will be dragged, because otherwise you don't know how to start the drag. > Please feel free to point out cases where another HTML attribute would > have an advantage over a DOM property that could be set directly via > script. It's easier to initialise a content attribute than a DOM attribute. > As for the dragging event model for a single DOM element, I think the > events outlined in the current draft of the spec are a good start. In > addition, however, it would be nice to add some presentational niceties > via CSS pseudo-classes. The CSS aspect of things is separate from the logic side, we'll probably have to deal with the CSS side in the CSS working group. > For the droppable model, it makes sense to have the drag target element > specify either Elements or NodeLists that are droppable. The droppable model implemented by IE and Safari has the potential drop target simply respond to events to say whether things can be dropped or not. In general, though, we want to start simple and only add complexity to this model if use cases warrant it. The model that IE has is complex enough as it is without making it much worse. :-) -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From ianb at colorstudy.com Fri May 6 15:55:13 2005 From: ianb at colorstudy.com (Ian Bicking) Date: Fri, 06 May 2005 17:55:13 -0500 Subject: [whatwg] A thought: Message-ID: <427BF5D1.8050207@colorstudy.com> I was just thinking about the recent problems introduced by the Google Web Accelerator following links that have side effects (the typical [delete this] stuff). One of the issues is that doing the Right Thing means creating a form, and that effects the UI, and of course the nesting form issue and all that. The Web Forms spec deals with this some, with the action attribute for submit buttons and some other details. A related extension might be a method attribute to anchor tags. One might expect [delete this] to do a post request to "form" with a request body of "delete=10". Or it could do a post with an empty request body, but unfortunately a large number of web frameworks ignore URL variables in post requests. The benefit is that this would be easy to apply to current applications, would generally be backward compatible with all user agents (as long as the server respected GET responses), and can be implemented in Javascript fairly easy. And for many applications this is purely a template change, not requiring any server code changes. The Google Web Accelerator will still be broken (the method attribute wouldn't magically appear on all the many applications out there), but at least conscientious web developers would have a fairly simple option to do the right thing. Anyway, just an idea that occurred to me; I tried searching the archives a bit and didn't notice anything on the topic. -- Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org From cbiesinger at web.de Fri May 6 17:34:01 2005 From: cbiesinger at web.de (Christian Biesinger) Date: Sat, 07 May 2005 02:34:01 +0200 Subject: [whatwg] The element and fallback content In-Reply-To: References: <4277BAAD.50105@web.de> Message-ID: <427C0CF9.8010200@web.de> OK, another fallback question: Consider an object that has no attributes that would allow selecting a plugin/content handler. For simplicity, consider an object without any attributes, say: Foo What should be displayed? Should the user agent just fall back to the contents of the object? (Presumably "empty string" as fallback content does not affect the answer to this question either :-) ) -biesi -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 4792 bytes Desc: S/MIME Cryptographic Signature URL: From ian at hixie.ch Fri May 6 17:38:54 2005 From: ian at hixie.ch (Ian Hickson) Date: Sat, 7 May 2005 00:38:54 +0000 (UTC) Subject: [whatwg] The element and fallback content In-Reply-To: <427C0CF9.8010200@web.de> References: <4277BAAD.50105@web.de> <427C0CF9.8010200@web.de> Message-ID: On Sat, 7 May 2005, Christian Biesinger wrote: > > OK, another fallback question: Consider an object that has no > attributes that would allow selecting a plugin/content handler. For > simplicity, consider an object without any attributes, say: > Foo > > What should be displayed? Same as if the were replaced by a . -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From ian at hixie.ch Fri May 6 17:50:22 2005 From: ian at hixie.ch (Ian Hickson) Date: Sat, 7 May 2005 00:50:22 +0000 (UTC) Subject: [whatwg] A thought: In-Reply-To: <427BF5D1.8050207@colorstudy.com> References: <427BF5D1.8050207@colorstudy.com> Message-ID: On Fri, 6 May 2005, Ian Bicking wrote: > > A related extension might be a method attribute to anchor tags. One might > expect [delete this] to do a post > request to "form" with a request body of "delete=10". This has been brought up several times, although I don't remember the past reasonings for it not being added to the spec. The main problem I have with it is that it feels wrong. (Yup, I'm giving really good arguments today!) The element is supposed to be a hyperlink -- but if you say it can be a form submission, that breaks that model. Fundamentally, I feel users should be able to always treat hyperlinks as safe-to-click -- they are links. So I would say that any time an author needs something to have UI that is a submission, it should be clearly submission UI. And that would be a And that's not too bad. If you really didn't want it to look like a button, you could go out of your way to use CSS to do that. If the UA allowed it (if the UA actually allowed that). But one major reasons for buttons not being used (besides currently requiring Javascript) is that they don't look very nice in long lists, so control over appearance is important. But using anchors for actions is so engrained in web developers that it might not be enough of a carrot. > But having said that, a lot of people have asked for this kind of thing. > Should we give up on our ideals in this particular case and just say that > the "method" attribute can change the from being a simple hyperlink to > being part of a submission UI? I must admit I don't know what you mean by "submission UI". If you mean, act like a submit button for the containing form, then no, people use anchors specifically to avoid that. Or do you mean something else? -- Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org From daniel.oconnor at gmail.com Fri May 6 21:20:49 2005 From: daniel.oconnor at gmail.com (Daniel O'Connor) Date: Sat, 7 May 2005 13:50:49 +0930 Subject: [whatwg] A thought: In-Reply-To: <427C181F.3090003@colorstudy.com> References: <427BF5D1.8050207@colorstudy.com> <427C181F.3090003@colorstudy.com> Message-ID: <106cc12005050621205412f0da@mail.gmail.com> Is this perhaps a problem that is solved with rel="nofollow"? I can see where it would be beneficial to have a profile of link relationship types to denote functional links. ie to say "this is a link which is used for editing and administration, don't follow it". That neatly describes the link functionality in a set of known terms, and avoid a lot of the mess with prefetching... On 5/7/05, Ian Bicking wrote: > Ian Hickson wrote: > > On Fri, 6 May 2005, Ian Bicking wrote: > > > >>A related extension might be a method attribute to anchor tags. One might > >>expect [delete this] to do a post > >>request to "form" with a request body of "delete=10". > > > > > > This has been brought up several times, although I don't remember the past > > reasonings for it not being added to the spec. > > > > The main problem I have with it is that it feels wrong. (Yup, I'm giving > > really good arguments today!) The element is supposed to be a > > hyperlink -- but if you say it can be a form submission, that breaks that > > model. Fundamentally, I feel users should be able to always treat > > hyperlinks as safe-to-click -- they are links. > > > > So I would say that any time an author needs something to have UI that is > > a submission, it should be clearly submission UI. And that would be a > > > > And that's not too bad. If you really didn't want it to look like a > button, you could go out of your way to use CSS to do that. If the UA > allowed it (if the UA actually allowed that). But one major reasons for > buttons not being used (besides currently requiring Javascript) is that > they don't look very nice in long lists, so control over appearance is > important. But using anchors for actions is so engrained in web > developers that it might not be enough of a carrot. > > > But having said that, a lot of people have asked for this kind of thing. > > Should we give up on our ideals in this particular case and just say that > > the "method" attribute can change the from being a simple hyperlink to > > being part of a submission UI? > > I must admit I don't know what you mean by "submission UI". If you > mean, act like a submit button for the containing form, then no, people > use anchors specifically to avoid that. Or do you mean something else? > > -- > Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org > -- http://www.ahsonline.com.au/dod/FOAF.rdf From ian at hixie.ch Fri May 6 21:35:35 2005 From: ian at hixie.ch (Ian Hickson) Date: Sat, 7 May 2005 04:35:35 +0000 (UTC) Subject: [whatwg] A thought: In-Reply-To: <427C181F.3090003@colorstudy.com> References: <427BF5D1.8050207@colorstudy.com> <427C181F.3090003@colorstudy.com> Message-ID: On Fri, 6 May 2005, Ian Bicking wrote: > > I'd basically agree. Which perhaps makes the argument stronger -- I > agree, and yet when I'm actually writing an application I frequently do > this anyway ;) This is such a common practice, and at least > method="post" offers a path to get people to move in the right > direction. That's a good point. I've added your suggestion to the list of things for me to look at when I go through the "semantics" stuff again (i.e. element definitions) in the Web Apps 1 (aka "HTML5") spec. > It's not 100% clear to me how you'd do the equivalent with If it was:
Note that using a link for this is somewhat of a hack:
delete this We're making the submission URI a magic string, which is suboptimal at best. I'd feel more comfortable with something like: delete this ...but of course that wouldn't be backwards compatible. > But one major reasons for buttons not being used (besides currently > requiring Javascript) is that they don't look very nice in long lists, > so control over appearance is important. How does this work in native UIs? People don't use links there. Why is this different? > > But having said that, a lot of people have asked for this kind of > > thing. Should we give up on our ideals in this particular case and > > just say that the "method" attribute can change the from being a > > simple hyperlink to being part of a submission UI? > > I must admit I don't know what you mean by "submission UI". If you > mean, act like a submit button for the containing form, then no, people > use anchors specifically to avoid that. Or do you mean something else? That's exactly what I meant. People shouldn't avoid it -- something that looks like a link should be a fricking link. I should see the URI in the status bar and be able to copy it and paste it and open multiple windows and so forth and it should all just be idempotent. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From ianb at colorstudy.com Fri May 6 22:03:32 2005 From: ianb at colorstudy.com (Ian Bicking) Date: Sat, 07 May 2005 00:03:32 -0500 Subject: [whatwg] A thought: In-Reply-To: References: <427BF5D1.8050207@colorstudy.com> <427C181F.3090003@colorstudy.com> Message-ID: <427C4C24.2090006@colorstudy.com> Ian Hickson wrote: >>It's not 100% clear to me how you'd do the equivalent with > > If it was: > >
> > I'm specifically thinking of places where you'd need to use Javascript now. For instance:
1:
delete
2: ... Now, there's also good reasons to submit the entire form for a delete (and saving any changes to other fields), but this isn't the only time this kind of layout makes sense, and because a form's scope is tied to the layout and you can't have nested forms, there's no good way out. My impression from the spec was that the use of
> > > ... > > ... should it return 0? Or should it look for all descendents of TABLE > when there is neither a TBODY or TR child element. It returns 0, because the table contains neither tbody nor tr children. > # getColumnCount(): If the table has a thead element child, and the > # first such element has a tr element child, then the number of columns > # returned by the default data provider must be the number of th > # element children in the first such tr element, if there are any such > # th elements. > > This 'messes up' perfectly valid tables like: > >
> > > >
Male > Female >
Alcoholic > Suicidel > ... > > ... no? As the spec says: The colspan and rowspan attributes are ignored by this algorithm. Datagrids in common GUIs aren't capable of complex column captions like the above. How would you change the spec to work with the above? > # getCaptionText(i): If the table has no thead element child, or if its > # first thead element child has no tr element child, the default data > # provider must return the empty string for all captions. Otherwise, > # the value of the textContent attribute of the ith th element child > # of the first tr element child of the first thead element child of the > # table element must be returned. If there is no such th element, the > # empty string must be returned. > > How about trying to select the value of the CAPTION element[1] first? > The same might apply to getCaptionClasses(i, classes). The caption element gives the table's caption, not a column's caption. > By the way, it would make more sense to say: > > > > ... and that it then applies to all columns. Yeah, this is one of the things I was wondering about. The problem there is that it would only make sense for one of the cases, not the others. As a compromise I've made the spec look at the class attribute of the element and if that says sortable, use that. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From fora at annevankesteren.nl Sun May 1 10:36:45 2005 From: fora at annevankesteren.nl (Anne van Kesteren) Date: Sun, 01 May 2005 19:36:45 +0200 Subject: [whatwg] [html5] 2.20.1. The datagrid element In-Reply-To: References: <42724E9C.80105@annevankesteren.nl> Message-ID: <427513AD.7020907@annevankesteren.nl> Ian Hickson wrote: >> What happens here: >> >> [snip] > > It returns 0, because the table contains neither tbody nor tr > children. I was wondering if that was desired. >> This 'messes up' perfectly valid tables like: >> >> [snip] >> >> ... no? > > As the spec says: The colspan and rowspan attributes are ignored by > this algorithm. > > Datagrids in common GUIs aren't capable of complex column captions > like the above. How would you change the spec to work with the above? Don't check THEAD for such data. And also, perhaps it would be useful to check COLGROUP and COL elements first... -- Anne van Kesteren From fora at annevankesteren.nl Sun May 1 10:39:47 2005 From: fora at annevankesteren.nl (Anne van Kesteren) Date: Sun, 01 May 2005 19:39:47 +0200 Subject: [whatwg] charset attribute of HTMLScriptElement In-Reply-To: <42749EF5.7050909@olav.dk> References: <20050501122151.C07C.TATO@fureai.or.jp> <42749EF5.7050909@olav.dk> Message-ID: <42751463.4020207@annevankesteren.nl> ? wrote: > Wouldn't it be safer to declare the encoding in the js file itself? > It could be in a magic comment at the start of the document: > //@charset("utf8") > Not very elegant, but less error prone than to specify the encoding > everywhere the file is included. You really want to use the BOM of UTF-8 instead of this I guess. -- Anne van Kesteren From ian at hixie.ch Sun May 1 12:22:07 2005 From: ian at hixie.ch (Ian Hickson) Date: Sun, 1 May 2005 19:22:07 +0000 (UTC) Subject: [whatwg] charset attribute of HTMLScriptElement In-Reply-To: <42751463.4020207@annevankesteren.nl> References: <20050501122151.C07C.TATO@fureai.or.jp> <42749EF5.7050909@olav.dk> <42751463.4020207@annevankesteren.nl> Message-ID: On Sun, 1 May 2005, Anne van Kesteren wrote: > > You really want to use the BOM of UTF-8 instead of this I guess. See http://www.ietf.org/internet-drafts/draft-hoehrmann-script-types-02.txt -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From ian at hixie.ch Sun May 1 12:24:34 2005 From: ian at hixie.ch (Ian Hickson) Date: Sun, 1 May 2005 19:24:34 +0000 (UTC) Subject: [whatwg] [html5] 2.20.1. The datagrid element In-Reply-To: <427513AD.7020907@annevankesteren.nl> References: <42724E9C.80105@annevankesteren.nl> <427513AD.7020907@annevankesteren.nl> Message-ID: On Sun, 1 May 2005, Anne van Kesteren wrote: > > > > It returns 0, because the table contains neither tbody nor tr > > children. > > I was wondering if that was desired. It was intended. Whether it is desired or not, I am not 100% sure. I'm open to alternate algorithms. > > As the spec says: The colspan and rowspan attributes are ignored by > > this algorithm. > > > > Datagrids in common GUIs aren't capable of complex column captions > > like the above. How would you change the spec to work with the above? > > Don't check THEAD for such data. This would mean having to do a search of every element in the before knowing whether to use it or not. This would be very bad for performance. Also, it's unclear to me what you would look for -- colspan attributes with values that don't convert to numeric 1? > And also, perhaps it would be useful to check COLGROUP and COL elements > first... Check them for what? -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From fora at annevankesteren.nl Sun May 1 12:28:21 2005 From: fora at annevankesteren.nl (Anne van Kesteren) Date: Sun, 01 May 2005 21:28:21 +0200 Subject: [whatwg] [html5] 2.20.1. The datagrid element In-Reply-To: References: <42724E9C.80105@annevankesteren.nl> <427513AD.7020907@annevankesteren.nl> Message-ID: <42752DD5.4070509@annevankesteren.nl> Ian Hickson wrote: > It was intended. Whether it is desired or not, I am not 100% sure. > I'm open to alternate algorithms. I was thinking about checking descendents instead of children as last option. Not sure how that is for performance though. Perhaps the specification should be updated after real world problems have occured with the current specification instead of thinking about real world problems that might come to exist. >>> As the spec says: The colspan and rowspan attributes are ignored >>> by this algorithm. >>> >>> Datagrids in common GUIs aren't capable of complex column >>> captions like the above. How would you change the spec to work >>> with the above? >> >> Don't check THEAD for such data. > > This would mean having to do a search of every element in the > before knowing whether to use it or not. This would be very bad for > performance. Also, it's unclear to me what you would look for -- > colspan attributes with values that don't convert to numeric 1? This would mean checking the first child of the TBODY element for the amount of TD children it has. Not? -- Anne van Kesteren From ian at hixie.ch Sun May 1 13:02:40 2005 From: ian at hixie.ch (Ian Hickson) Date: Sun, 1 May 2005 20:02:40 +0000 (UTC) Subject: [whatwg] [html5] 2.20.1. The datagrid element In-Reply-To: <42752DD5.4070509@annevankesteren.nl> References: <42724E9C.80105@annevankesteren.nl> <427513AD.7020907@annevankesteren.nl> <42752DD5.4070509@annevankesteren.nl> Message-ID: On Sun, 1 May 2005, Anne van Kesteren wrote: > > I was thinking about checking descendents instead of children as last > option. Not sure how that is for performance though. Perhaps the > specification should be updated after real world problems have occured > with the current specification instead of thinking about real world > problems that might come to exist. Yeah. (You'd also get into problems with nested tables, etc.) > > > > As the spec says: The colspan and rowspan attributes are ignored > > > > by this algorithm. > > > > > > > > Datagrids in common GUIs aren't capable of complex column captions > > > > like the above. How would you change the spec to work with the > > > > above? > > > > > > Don't check THEAD for such data. > > > > This would mean having to do a search of every element in the > > before knowing whether to use it or not. This would be very bad for > > performance. Also, it's unclear to me what you would look for -- > > colspan attributes with values that don't convert to numeric 1? > > This would mean checking the first child of the TBODY element for the > amount of TD children it has. Not? Oh you want to use the tbody for the cell count and the thead for the captions? I guess we could do that. It makes it simpler. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From tato at fureai.or.jp Sun May 1 18:54:01 2005 From: tato at fureai.or.jp (Toshirou Takahashi) Date: Mon, 02 May 2005 10:54:01 +0900 Subject: [whatwg] charset attribute of HTMLScriptElement In-Reply-To: References: <20050501122151.C07C.TATO@fureai.or.jp> Message-ID: <20050502105100.96C5.TATO@fureai.or.jp> Ian Hickson wrote: > On Sun, 1 May 2005, Toshirou Takahashi wrote: > > > > i hope to add the charset attribute to HTMLScriptElement, on 2.12.1. > > > > Because the person who made .js file doesn't know whether the file is > > used with what charset all over the world. > > You can already do this -- just include the correct encoding information > in the Content-Type header for the JS file, as in: > > Content-Type: text/javascript;charset=utf-8 It is a good method. I also agree and I can do. However, how do you do when the user cannot use cgi , .htaccess etc ? Many users can not necessarily use cgi etc , and cannot make .htaccess at for instance, many rental servers... Regards -- Toshirou Takahashi From ian at hixie.ch Sun May 1 19:12:59 2005 From: ian at hixie.ch (Ian Hickson) Date: Mon, 2 May 2005 02:12:59 +0000 (UTC) Subject: [whatwg] charset attribute of HTMLScriptElement In-Reply-To: <20050502101051.96BE.TATO@fureai.or.jp> References: <20050501122151.C07C.TATO@fureai.or.jp> <20050502101051.96BE.TATO@fureai.or.jp> Message-ID: On Mon, 2 May 2005, Toshirou Takahashi wrote: > > > > You can already do this -- just include the correct encoding > > information in the Content-Type header for the JS file, as in: > > > > Content-Type: text/javascript;charset=utf-8 > > It is a good method. I also agree and I can do. > > However, how do you do when the user cannot use cgi , .htaccess etc ? When using systems that are unable of basic compliance with existing Web standards, it is possible to include the character encoding in the "type" attribute of the However, it should be noted that in most cases HTTP defines that the information contained in that attribute is overridden by the information in the HTTP headers and thus this is not a reliable method (and would not work, for instance, if the server sent back contradictory metadata). -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From tato at fureai.or.jp Sun May 1 22:37:52 2005 From: tato at fureai.or.jp (Toshirou Takahashi) Date: Mon, 02 May 2005 14:37:52 +0900 Subject: [whatwg] charset attribute of HTMLScriptElement In-Reply-To: References: <20050502101051.96BE.TATO@fureai.or.jp> Message-ID: <20050502143421.96D8.TATO@fureai.or.jp> oo... sory there was no Cc: whatwg at whatwg.org send again. -- hi Ian : > On Mon, 2 May 2005, Toshirou Takahashi wrote: > > > > > > You can already do this -- just include the correct encoding > > > information in the Content-Type header for the JS file, as in: > > > > > > Content-Type: text/javascript;charset=utf-8 > > > > It is a good method. I also agree and I can do. > > > > However, how do you do when the user cannot use cgi , .htaccess etc ? > > When using systems that are unable of basic compliance with existing Web > standards, it is possible to include the character encoding in the "type" > attribute of the I also know the method. However, to our regret, I have not seen the good operation on any browser... Charset atribute functions well of course. [ Test ] http://jsgt.org/whatwg/wa102121script/ --------------------------------------------------------------------- ToUtf8FromSjisByType.html Win IE6 ng Firefox0.8 ng Opera8.0 ng --------------------------------------------------------------------- ToSjisFromUtf8ByType.html Win IE6 ng Firefox0.8 ng Opera8.0 ng --------------------------------------------------------------------- ToUtf8FromSjisByCharset.html Win IE6 ok Firefox0.8 ok Opera8.0 ok --------------------------------------------------------------------- ToSjisFromUtf8ByCharset.html Win IE6 ok Firefox0.8 ok Opera8.0 ok Thanx, -- Toshirou Takahashi From tato at fureai.or.jp Mon May 2 02:41:00 2005 From: tato at fureai.or.jp (Toshirou Takahashi) Date: Mon, 02 May 2005 18:41:00 +0900 Subject: [whatwg] charset attribute of HTMLScriptElement In-Reply-To: <20050502143421.96D8.TATO@fureai.or.jp> References: <20050502143421.96D8.TATO@fureai.or.jp> Message-ID: <20050502182456.04C1.TATO@fureai.or.jp> The test of Mac and Linux was added. [ Test ] http://jsgt.org/whatwg/wa102121script/ ok == success ng == failure ===================================================================== // type attribute // // --------------------------------------------------------------------- ToUtf8FromSjisByType.html Win IE6 ng Firefox0.8 ng Opera8.0 ng Mac IE5.2 ng Safari1.25 ng Linux Konqueror3.3 ng --------------------------------------------------------------------- ToSjisFromUtf8ByType.html Win IE6 ng Firefox0.8 ng Opera8.0 ng Mac IE5.2 ng Safari1.25 ng Linux Konqueror3.3 ng ===================================================================== // charset attribute // // --------------------------------------------------------------------- ToUtf8FromSjisByCharset.html Win IE6 ok Firefox0.8 ok Opera8.0 ok Mac IE5.2 ok Safari1.25 ok Linux Konqueror3.3 ok --------------------------------------------------------------------- ToSjisFromUtf8ByCharset.html Win IE6 ok Firefox0.8 ok Opera8.0 ok Mac IE5.2 ok Safari1.25 ok Linux Konqueror3.3 ok Thanx, -- Toshirou Takahashi From fora at annevankesteren.nl Mon May 2 13:44:02 2005 From: fora at annevankesteren.nl (Anne van Kesteren) Date: Mon, 02 May 2005 22:44:02 +0200 Subject: [whatwg] [html5] 9.2. Focus Message-ID: <42769112.9040209@annevankesteren.nl> I would like the specification to say more explicitly which value of the TABINDEX attribute is the default value. For example, when I want the LI attribute of my drop down menu to be tabable and don't want to override the normal tabbing order there needs to be some kind of default value. I guess this is '0', but that should be more clear. (It could also be stated that elements through which can be tabbed by defaullt have that value. Either way is fine, but perhaps both should be mentioned...) As TABINDEX is likely to affect if elements will match :enabled and :disabled that should be stated as well. Also, what is the difference between '-1' and '-10000' as values for the TABINDEX attribute? It might make sense to say something along the lines of "any negative value is treated the same". It is unclear from the specification what it means when one element has '1' and another has '4'. I might have missed it but I don't see which is supposed to be more important. I was also wondering about inheritance. -- Anne van Kesteren From peter at opera.com Mon May 2 23:27:15 2005 From: peter at opera.com (Peter Karlsson) Date: Tue, 3 May 2005 07:27:15 +0100 (CET) Subject: [whatwg] Re: charset attribute of HTMLScriptElement In-Reply-To: References: <20050501122151.C07C.TATO@fureai.or.jp> <20050502101051.96BE.TATO@fureai.or.jp> Message-ID: Ian Hickson on 2005-05-02: > When using systems that are unable of basic compliance with existing Web > standards, it is possible to include the character encoding in the "type" > attribute of the Is simply bad, there's no rationale for all that extra indirection, can I also remind you once again that the WHAT-WG individual has stated: "Creating a 3D markup language is somewhat outside the purview of this working group, though." your explanation of loading these external files, would require you to create just such a markup language. This is the problem I have, without external files of any sort, then a 3D api is pretty useless, the fact it's been trivial in IE since 1997, yet hasn't been used, I think makes that clear. > If by declarative you mean like X3D, then WHATWG clearly shouldn't > add such markup to HTML because it would duplicate the work of another > group unnecessarily. Just like it's not necessary to embed jpeg's inside HTML documents to get images in them, it's not necessary to embed 3D markup inside HTML documents to get 3D images. > If I'm reading this right, you're saying that no one uses > DirectAnimation, and perhaps 3D in general, so why introduce a > potentially competing standard when there's no real demand for the > original? I'm asking for you to justify your use cases, for example implement a mock one in some pseudo code, you will see very rapidly that for any of them to work they require externally defined 3D models, defining a 3D model language is "somewhat outside the purview of this working group". If you discover that you don't, then I will gladly concede that your use-cases are practical. As to the DirectAnimation, one of the "fundamental principles" of the WHAT-WG is "features should be implementable using behaviors, scripting, and style sheets in IE6 today" the only way to do that with 3D is to use a DirectAnimation layer, because of that, it makes complete sense to just take the DirectAnimation API as a whole. Jim. From judell at gmail.com Tue May 3 08:10:57 2005 From: judell at gmail.com (Jon Udell) Date: Tue, 3 May 2005 11:10:57 -0400 Subject: [whatwg] password option for window.prompt? Message-ID: <94a59c7d0505030810448c2a33@mail.gmail.com> what: a password option for window.prompt why: http://weblog.infoworld.com/udell/2005/05/03.html#a1227 - Jon Udell From jim.ley at gmail.com Wed May 4 08:50:27 2005 From: jim.ley at gmail.com (Jim Ley) Date: Wed, 4 May 2005 16:50:27 +0100 Subject: [whatwg] password option for window.prompt? In-Reply-To: <94a59c7d0505030810448c2a33@mail.gmail.com> References: <94a59c7d0505030810448c2a33@mail.gmail.com> Message-ID: <851c8d31050504085064577fce@mail.gmail.com> On 5/3/05, Jon Udell wrote: > what: a password option for window.prompt > > why: http://weblog.infoworld.com/udell/2005/05/03.html#a1227 Modal dialogs prompt/alert/confirm etc. are bad from an accessibility context, and should not be used in real applications. As what you want is not part of a web application, but something specific to your browsers chrome, request something from them, it should not be standardised anywhere else. Jim. From fantasai.lists at inkedblade.net Wed May 4 12:36:59 2005 From: fantasai.lists at inkedblade.net (fantasai) Date: Wed, 04 May 2005 15:36:59 -0400 Subject: [whatwg] Re: Autodiscovery In-Reply-To: <0ddadc99a41ce83550ede71051ea02ae@iki.fi> References: <42784696.1060409@gmail.com> <31750ab13687e0b55c9eb9cdd2ffdd66@iki.fi> <14be96d305050323162633186b@mail.gmail.com> <0ddadc99a41ce83550ede71051ea02ae@iki.fi> Message-ID: <4279245B.4020907@inkedblade.net> Henri Sivonen wrote: > > On May 4, 2005, at 09:16, Mark Pilgrim wrote: > >> Then I'm confused as to why you can't just release running code that >> hard-codes rel="alternate". You know, like people have already done. > > Sure you can. ("Can" in the sense that it is possible.) > > However, when other things are equal, I think misusing an existing > relation (feed usually is not a proper alternate representation) is > worse than specifying a new one without all the profile fluff. > > Still, I am well aware that the other things are not equal in this case > (ie. there is deployed code), which is why I was not arguing in favor of > rel='feed' per se, but pointing out that the particular reasoning > against it did not hold water, IMO. It is the case that many, if not most, autodiscovery links *are* linking to valid alternates of the current page. Taking into account the wide use of the rel="alternate" type="application/atom+xml" combination, the spec could be written to - specify that any link with rel="feed" and type="application/atom+xml" indicates an autodiscoverable Atom feed - specify that UAs MAY also recognize the rel="alternate" and type="application/atom+xml" combination as an autodiscoverable Atom feed even if 'feed' is not among the rel values, - but specify that authors SHOULD NOT (or MUST NOT) leave out the 'feed' value - recommend that links that do indicate a feed version of the current HTML page SHOULD link to that feed with both link types Blogging software is a fast-moving industry. If the draft editor makes this change and notifies the community, I suspect it will not be long before most software supports both syntaxes. ~fantasai From ian at hixie.ch Wed May 4 15:51:17 2005 From: ian at hixie.ch (Ian Hickson) Date: Wed, 4 May 2005 22:51:17 +0000 (UTC) Subject: [whatwg] Drag and drop in HTML5 Message-ID: I am currently working on trying to specify IE's (and now Safari's) drag and drop API. In IE, drag and drop is basically only supported for WYSIWYG editing use cases: you can drag selections, images, and URLs. That's fine. Those are a major use case which we need to support, and the API is designed in a way that makes it easy to specify independent of media or platform (the names may be media-specific, but, like the "click" event, that's just to make developing for the platform easy, it's not actually stopping those events from being used for slightly different purposes in other media). In Safari, you can also drag entire blocks. This is done by using a CSS property, -khtml-user-drag I believe, which can take values that disallow dragging, enable selection and image dragging, and enable whole-element dragging. Now for Safari's use case this makes sense. Their target was platform-dependent, media-specific widgets, with accessibility needs addressed explicitly in the widget's code. However, from an HTML point of view, it doesn't make sense. Having a style property control application behaviour is wrong -- the fact that something is draggable isn't going to change depending on what the skin is. It's not even going to change based on the media -- something that's draggable (via a mouse) on a visual UA is still going to be draggable when the user is using an interactive aural agent (albeit with a radically different interaction model probably involving explicitly picking two elements and saying that the first is to be dragged to the second). So there is currently no whole-element drag-and-drop API that we can conveniently re-use. There are use cases though: - Dragging items around in a visual representation. You drag little ships in a game showing a visual representation of the game board (for example, I really want to drag the fleet icons in VoidWars www.voidwars.com). I could see you dragging icons around the map in Google Maps. -- here it seems like we may want a specific element that represents a "thing". There's more to this case than just dragging and dropping -- there is a media-dependent aspect as well. You're dropping to a specific coordinate. Non-visual media are SOL if this is the only way to interact with the application. - Dragging items to classify them. I could see you dragging items from a list of items in a shopping mall interface to a virtual shopping cart, or dragging them out from there to a wishlist. Another example of this is dragging cards (between piles) in a card game. -- here it seems that we have a structure where one element contains a set of other elements all of which are draggable, and all of which can be dragged to specific other elements. Would it be enough to just mark elements as drag-item-sources and drag-targets and say that all the elements in d-i-sources can be dragged to d-targets? - Dragging items around a list view or between list views. -- here it seems like should just natively support drag and drop, so we don't need much more here. What other use cases are there? Are there any requirements I'm missing? -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From dean at edwards.name Wed May 4 16:12:40 2005 From: dean at edwards.name (Dean Edwards) Date: Thu, 05 May 2005 00:12:40 +0100 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: References: Message-ID: <427956E8.3090708@edwards.name> Ian Hickson wrote: > I am currently working on trying to specify IE's (and now Safari's) drag > and drop API. > > However, from an HTML point of view, it doesn't make sense. Having a style > property control application behaviour is wrong -- the fact that something > is draggable isn't going to change depending on what the skin is. It's not > even going to change based on the media -- something that's draggable (via > a mouse) on a visual UA is still going to be draggable when the user is > using an interactive aural agent (albeit with a radically different > interaction model probably involving explicitly picking two elements and > saying that the first is to be dragged to the second). > > So there is currently no whole-element drag-and-drop API that we can > conveniently re-use. Controlling behavior through CSS is OK if the what you are changing is CSS. It seems there two kinds of drag/drop. One kind affects the DOM, e.g. changing the order of items in a list. The other kind affects CSS, e.g. dragging a window on screen. For a draggable window only the CSS "left" and "top" positions would be a affected. It would be difficult to specify this without CSS! Ideally, i'd like to do both. Use CSS to declare a draggable element and use HTML to declare a list that can be re-ordered. -dean From ian at hixie.ch Wed May 4 16:20:10 2005 From: ian at hixie.ch (Ian Hickson) Date: Wed, 4 May 2005 23:20:10 +0000 (UTC) Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: <427956E8.3090708@edwards.name> References: <427956E8.3090708@edwards.name> Message-ID: On Thu, 5 May 2005, Dean Edwards wrote: > > Controlling behavior through CSS is OK if the what you are changing is > CSS. > > It seems there two kinds of drag/drop. One kind affects the DOM, e.g. > changing the order of items in a list. The other kind affects CSS, e.g. > dragging a window on screen. For a draggable window only the CSS "left" > and "top" positions would be a affected. It would be difficult to > specify this without CSS! > > Ideally, i'd like to do both. Use CSS to declare a draggable element and > use HTML to declare a list that can be re-ordered. True. I am primarily (exclusively?) concerned with "meaningful" dragging-and-dropping here. Resizing or moving things that aren't otherwise affecting the logic of the application is out of scope. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From hyatt at apple.com Wed May 4 16:58:01 2005 From: hyatt at apple.com (David Hyatt) Date: Wed, 4 May 2005 16:58:01 -0700 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: <427956E8.3090708@edwards.name> References: <427956E8.3090708@edwards.name> Message-ID: Safari also supports a :-khtml-dragging pseudo-class (like :hover or :active) that is used to render the element while it is being dragged. This allows you to do dynamic drag effects solely using CSS, is purely presentational, and so IMO does belong in CSS. I personally think controlling focusability, dragging, selection and editing from CSS is a done deal. Safari and Dashboard already support user-drag, user-select and user-modify. Mozilla supports user-focus and user-select. We plan to add user-focus support to Safari. dave On May 4, 2005, at 4:12 PM, Dean Edwards wrote: > Ian Hickson wrote: > >> I am currently working on trying to specify IE's (and now >> Safari's) drag and drop API. >> However, from an HTML point of view, it doesn't make sense. Having >> a style property control application behaviour is wrong -- the >> fact that something is draggable isn't going to change depending >> on what the skin is. It's not even going to change based on the >> media -- something that's draggable (via a mouse) on a visual UA >> is still going to be draggable when the user is using an >> interactive aural agent (albeit with a radically different >> interaction model probably involving explicitly picking two >> elements and saying that the first is to be dragged to the second). >> So there is currently no whole-element drag-and-drop API that we >> can conveniently re-use. >> > > Controlling behavior through CSS is OK if the what you are changing > is CSS. > > It seems there two kinds of drag/drop. One kind affects the DOM, > e.g. changing the order of items in a list. The other kind affects > CSS, e.g. dragging a window on screen. For a draggable window only > the CSS "left" and "top" positions would be a affected. It would be > difficult to specify this without CSS! > > Ideally, i'd like to do both. Use CSS to declare a draggable > element and use HTML to declare a list that can be re-ordered. > > -dean > > From ian at hixie.ch Wed May 4 17:19:21 2005 From: ian at hixie.ch (Ian Hickson) Date: Thu, 5 May 2005 00:19:21 +0000 (UTC) Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: References: <427956E8.3090708@edwards.name> Message-ID: On Wed, 4 May 2005, David Hyatt wrote: > > Safari also supports a :-khtml-dragging pseudo-class (like :hover or > :active) that is used to render the element while it is being dragged. > This allows you to do dynamic drag effects solely using CSS, is purely > presentational, and so IMO does belong in CSS. Yeah, that belongs in CSS. > I personally think controlling focusability, dragging, selection and > editing from CSS is a done deal. Safari and Dashboard already support > user-drag, user-select and user-modify. Mozilla supports user-focus and > user-select. We plan to add user-focus support to Safari. Whether an element (other than something purely presentational like a window) is draggable, whether an element is selectable, and whether an element is modifiable or editable are quite clearly not presentational aspects. They don't belong in the presentational layer, especially since that layer can be turned off. IMHO. As far as editing goes, contentEditable="" is the way we're going at the moment, I think. Focusable is probably going to be tabindex="". Selectable hasn't yet been discussed (I could be convinced that that is presentational, actually). Draggable is clearly not presentational; my current thinking is something like contentDraggable="" or something. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From hyatt at apple.com Wed May 4 18:37:47 2005 From: hyatt at apple.com (Dave Hyatt) Date: Wed, 4 May 2005 18:37:47 -0700 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: References: <427956E8.3090708@edwards.name> Message-ID: <30CD83E0-321D-41D9-8850-334B3923DE00@apple.com> WinIE supports setting tabindex to -1 to make an element focusable via .focus(). dave On May 4, 2005, at 5:19 PM, Ian Hickson wrote: > On Wed, 4 May 2005, David Hyatt wrote: > >> >> Safari also supports a :-khtml-dragging pseudo-class (like :hover or >> :active) that is used to render the element while it is being >> dragged. >> This allows you to do dynamic drag effects solely using CSS, is >> purely >> presentational, and so IMO does belong in CSS. >> > > Yeah, that belongs in CSS. > > > >> I personally think controlling focusability, dragging, selection and >> editing from CSS is a done deal. Safari and Dashboard already >> support >> user-drag, user-select and user-modify. Mozilla supports user- >> focus and >> user-select. We plan to add user-focus support to Safari. >> > > Whether an element (other than something purely presentational like a > window) is draggable, whether an element is selectable, and whether an > element is modifiable or editable are quite clearly not presentational > aspects. They don't belong in the presentational layer, especially > since > that layer can be turned off. > > IMHO. > > As far as editing goes, contentEditable="" is the way we're going > at the > moment, I think. Focusable is probably going to be tabindex="". > Selectable hasn't yet been discussed (I could be convinced that > that is > presentational, actually). Draggable is clearly not presentational; my > current thinking is something like contentDraggable="" or something. > > -- > Ian Hickson U+1047E ) > \._.,--....,'``. fL > http://ln.hixie.ch/ U+263A /, _.. \ _ > \ ;`._ ,. > Things that are impossible just take longer. `._.-(,_..'-- > (,_..'`-.;.' > From ian at hixie.ch Thu May 5 00:25:21 2005 From: ian at hixie.ch (Ian Hickson) Date: Thu, 5 May 2005 07:25:21 +0000 (UTC) Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: <30CD83E0-321D-41D9-8850-334B3923DE00@apple.com> References: <427956E8.3090708@edwards.name> <30CD83E0-321D-41D9-8850-334B3923DE00@apple.com> Message-ID: On Wed, 4 May 2005, Dave Hyatt wrote: > > WinIE supports setting tabindex to -1 to make an element focusable via > .focus(). Yeah, that's already in the WHATWG draft actually (or something close to it, it's only a first draft right now). -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From kornel at ldreams.net Thu May 5 02:18:17 2005 From: kornel at ldreams.net (Kornel Lesinski) Date: Thu, 05 May 2005 10:18:17 +0100 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: References: Message-ID: On Wed, 04 May 2005 23:51:17 +0100, Ian Hickson wrote: > So there is currently no whole-element drag-and-drop API that we can > conveniently re-use. There are use cases though: As a web developer I'd like: - enabling/disabling dragging for each DOM element: foo.draggable = true; - event that "asks" if item can be dropped "here". Dragged item should fire events on elements it hovers (like onmouseover) and response to this event (preventDefault?) should control if mouse pointer looks 'forbidden' or 'normal' accordingly. foo.addEventListener('dragtarget',function(e) {if (this.isBusy) e.preventDefault();},false); If it can't be an event (above example doesn't look bulletproof to me), less convenient method like specifying if element is allowed target may be sufficient (foo.dragTarget = true) - 'item dropped' event fired on target element - :drag CSS pseudo-class is nice idea. There might be also :drag-target (:drag:target?) pseudo-class that styles elements that "agreed" to be drag target. :drag {opacity: 0.5;} :drag-target {outline: 2px dotted red;} There is use-case of reordering items, which means dragging items in between other items. That seems a bit more complex, and probably needs additional helper API. To implement this with simple interface I've proposed, events should be handled either by existing elements (like list items that compare their size and position of dragged element to decide whether element should be dropped before or after) or handled by container that would probably need to calculate positions of it's children and create new element to show drop target. Smooth Mac-like drag'n'drop can be implemented by animating drop target's padding/margin. So that's quite a bit of code that's going to be reinvented each time someone implements reordering. -- pozdrawiam, Kornel Lesinski From hallvord at hallvord.com Thu May 5 08:41:01 2005 From: hallvord at hallvord.com (Hallvord Reiar Michaelsen Steen) Date: Thu, 05 May 2005 17:41:01 +0200 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: Message-ID: <427A5AAD.8649.1B2E609@localhost> On 4 May 2005 at 22:51, Ian Hickson wrote: > - Dragging items to classify them. I could see you dragging items from > a list of items in a shopping mall interface to a virtual shopping > cart, or dragging them out from there to a wishlist. Another example of > this is dragging cards (between piles) in a card game. Or dragging E-mails to folders in a webmail service.. One of the issues here is that there ought to be a way to drag a collection of elements that aren't necessarily siblings in the DOM. Perhaps a way to specify a "drag-group" to say that certain elements considered draggable should be dragged together. A DragGroup object would be a sort of nodelist.. Perhaps something like "myDragGroup.add(this);" would be more logical? Or perhaps just assign a specific ID string..? -- Hallvord Reiar Michaelsen Steen http://www.hallvord.com/ From hallvord at hallvord.com Thu May 5 08:56:29 2005 From: hallvord at hallvord.com (Hallvord Reiar Michaelsen Steen) Date: Thu, 05 May 2005 17:56:29 +0200 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: <427A5AAD.8649.1B2E609@localhost> References: Message-ID: <427A5E4D.11753.1C10EEF@localhost> On 5 May 2005 at 17:41, Hallvord Reiar Michaelsen Steen wrote: > dragGroup = mailBucket; (Meant "this.dragGroup = mailBucket;". Sorry.) -- Hallvord Reiar Michaelsen Steen http://www.hallvord.com/ From olav at olav.dk Thu May 5 09:13:38 2005 From: olav at olav.dk (=?ISO-8859-1?Q?Olav_Junker_Kj=E6r?=) Date: Thu, 05 May 2005 18:13:38 +0200 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: References: <427956E8.3090708@edwards.name> Message-ID: <427A4632.9040700@olav.dk> Ian Hickson wrote: > Selectable hasn't yet been discussed (I could be convinced that that is > presentational, actually). I don't think it is. Consider selecting options in a select-control. This is clearly semantic information. How selection is performed (mouse click, tab to element and press space, shouting the label on the element) is media dependent. regards Olav Junker Kj?r From ian at hixie.ch Thu May 5 14:12:59 2005 From: ian at hixie.ch (Ian Hickson) Date: Thu, 5 May 2005 21:12:59 +0000 (UTC) Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: <427A5AAD.8649.1B2E609@localhost> References: <427A5AAD.8649.1B2E609@localhost> Message-ID: On Thu, 5 May 2005, Hallvord Reiar Michaelsen Steen wrote: > > One of the issues here is that there ought to be a way to drag a > collection of elements that aren't necessarily siblings in the DOM. > Perhaps a way to specify a "drag-group" to say that certain elements > considered draggable should be dragged together. > > > > A DragGroup object would be a sort of nodelist.. Perhaps something > like "myDragGroup.add(this);" would be more logical? Or perhaps just > assign a specific ID string..? Do you mean that instead of labelling each draggable element as draggable, you would instead add each draggable element to a list? -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From ian at hixie.ch Thu May 5 14:15:27 2005 From: ian at hixie.ch (Ian Hickson) Date: Thu, 5 May 2005 21:15:27 +0000 (UTC) Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: <427A4632.9040700@olav.dk> References: <427956E8.3090708@edwards.name> <427A4632.9040700@olav.dk> Message-ID: On Thu, 5 May 2005, Olav Junker Kj?r wrote: > Ian Hickson wrote: > > Selectable hasn't yet been discussed (I could be convinced that that is > > presentational, actually). > > I don't think it is. Consider selecting options in a select-control. > This is clearly semantic information. How selection is performed (mouse > click, tab to element and press space, shouting the label on the > element) is media dependent. I meant text selection. Marking an entire element as selected would be done the same way as marking an element as checked, as disabled, and so forth; namely, using an API that lets you specifically label elements as being in that state as in: myDiv.isSelected = true; ...or something like that. There is the (very poor) beginnings of such a proposal in the Web Controls draft at the moment. It's a custom controls issue, IMHO. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From hallvord at hallvord.com Thu May 5 14:40:35 2005 From: hallvord at hallvord.com (Hallvord Reiar Michaelsen Steen) Date: Thu, 05 May 2005 23:40:35 +0200 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: References: <427A5AAD.8649.1B2E609@localhost> Message-ID: <427AAEF3.3714.2FC15A4@localhost> On 5 May 2005 at 21:12, Ian Hickson wrote: > > Perhaps a way to specify a "drag-group" to say that certain elements > > considered draggable should be dragged together. > Do you mean that instead of labelling each draggable element as draggable, > you would instead add each draggable element to a list? I suppose the most powerful API might have both a "draggable" and a "dragGroup" property on nodes, but this may of course be too complex. * The "baseline" option is to support draggable=true or some equivalent and let user drag and drop one such item at a time. * One alternative is to say that all items with draggable=true always are dragged - it requires a bit more caution by the JS author and the user - * The third way would be a draggable node list *and* a draggable property. (Only a list is functionally same as the option above) This is the way I thought it might work: When a drag action starts on an element that has draggable set to true, the UA checks if the dragGroup property of the element is set. If it is set, it performs a "drag" action on all the elements that refer to the same drag group and have their draggable property set to true. A use case might be a complex web mail interface where you can drag both contacts and E-mails, and drag only those you select by checkboxes or by clicking on them. Such an interface requires that you can drag multiple items, and distinguish different groups of multiple items. It would be really neat to have a CSS-like inheritance for the dragGroup so that you could specify it once - say
[list of E-mails, for example using UL, LI and A markup]
and all child nodes would drag together if selected. :-) -- Hallvord Reiar Michaelsen Steen http://www.hallvord.com/ From ian at hixie.ch Thu May 5 14:54:19 2005 From: ian at hixie.ch (Ian Hickson) Date: Thu, 5 May 2005 21:54:19 +0000 (UTC) Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: <427AAEF3.3714.2FC15A4@localhost> References: <427A5AAD.8649.1B2E609@localhost> <427AAEF3.3714.2FC15A4@localhost> Message-ID: On Thu, 5 May 2005, Hallvord Reiar Michaelsen Steen wrote: > > [...] So to summarise, you want a way to make a drag operation initiated on one element cause a number of elements to simultaneously be dragged. I see the use for that. As far as the mail case goes, I would imagine that would be done via a which would support dragging natively, so that would be a different problem. But I could see it being possible for groups of DOM nodes as well. My proposal for doing that would be to have a way in ondragstart to say "...and by the way, also drag all these elements at the same time". As in: function dragStartHandler(e) { e.dataTransfer.addElement(e.target.nextSibling.nextSibling); } ...or something. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From bfults at gmail.com Fri May 6 00:48:52 2005 From: bfults at gmail.com (Brad Fults) Date: Fri, 6 May 2005 00:48:52 -0700 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: References: <427956E8.3090708@edwards.name> Message-ID: <1959130b050506004881807b9@mail.gmail.com> On 5/4/05, Ian Hickson wrote: > > As far as editing goes, contentEditable="" is the way we're going at the > moment, I think. Focusable is probably going to be tabindex="". > Selectable hasn't yet been discussed (I could be convinced that that is > presentational, actually). Draggable is clearly not presentational; my > current thinking is something like contentDraggable="" or something. I don't really see a case outside the datagrid dragging (which is handled elsewhere) where there would be a need to specify an element as draggable or as a drag target without scripting in drag behavior. In light of this, I don't see any reason to pollute the HTML namespace with more attributes (contentDraggable) when this will necessarily be a scripted event anyway. Please feel free to point out cases where another HTML attribute would have an advantage over a DOM property that could be set directly via script. As for the dragging event model for a single DOM element, I think the events outlined in the current draft of the spec are a good start. In addition, however, it would be nice to add some presentational niceties via CSS pseudo-classes. :draggable = DOM element that has .draggable=true (or whatever is decided on) :dragging = DOM element that is being dragged (perhaps opacity: 0.5) :dragging:droppable = DOM element that is being dragged and can be dropped over its current location :dragtarget / ? = container that allows for the current dragging element to be dropped upon it (border: 2px dotted red) :dragged = the original DOM element that was dragged, in its original position (it would be up to script to determine whether or not to remove it or whatever else) I think something along these lines is invaluable to a rich GUI interface. Drag groups could be specified by a simple NodeList that would be defined at dragstart. e.g. var elDrag = document.getElementById("mydragelement"); var myNodeList = []; myNodeList.push(document.getElementById("dragfriend1")); myNodeList.push(document.getElementById("dragfriend2")); // or just as easily: var myNodeList = document.getElementsByTagName("LI"); elDrag.addEventListener("dragstart", function(e) { e.dragNodes.appendChildren(myNodeList); return true; }, false); For the droppable model, it makes sense to have the drag target element specify either Elements or NodeLists that are droppable. e.g. var elDragTarget = document.getElementById("mydragtarget"); elDragTarget.addDroppable(elDrag); elDragTarget.addDroppable(myNodeList); Then the question comes about dragging a group of elements to a drag target which only has *some* of the dragged elements in its droppable list. Without thinking about it too much, I think this could be handled when the elements are dropped as such: elDrag.addEventListener("dragend", function(e) { // go through each dropped element and check if it's droppable on the drag target for (var i=0; i < e.dragNodes.length; i++) if ( !dragTarget.isDroppable(e.dragNodes[i]) ) alert("Unabled to drag "+e.dragNodes[i].id+" to "+dragTarget.id); // of course something more graceful than an alert could be done return true; }, false); Anyway, most of it is food for thought. -- Brad Fults NeatBox -------------- next part -------------- An HTML attachment was scrubbed... URL: From bfults at gmail.com Fri May 6 00:58:50 2005 From: bfults at gmail.com (Brad Fults) Date: Fri, 6 May 2005 00:58:50 -0700 Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: <1959130b050506004881807b9@mail.gmail.com> References: <427956E8.3090708@edwards.name> <1959130b050506004881807b9@mail.gmail.com> Message-ID: <1959130b0505060058310f2bb4@mail.gmail.com> On 5/6/05, Brad Fults wrote: > > :draggable = DOM element that has .draggable=true (or whatever is decided > on) > :dragging = DOM element that is being dragged (perhaps opacity: 0.5) > :dragging:droppable = DOM element that is being dragged and can be dropped > over its current location > :dragtarget / ? = container that allows for the current dragging element > to be dropped upon it (border: 2px dotted red) > :dragged = the original DOM element that was dragged, in its original > position (it would be up to script to determine whether or not to remove it > or whatever else) > After thinking about it more, it seems that this list is incomplete. :dragtarget:droppable = the currently dragging element can be dropped over this element. (border: 2px dotted green) And instead, make :dragtarget generic for all drag targets for the currently dragging element. :dragtarget = a valid drag target for the currently dragging element--the dragging element is in this drag target's droppable list. (border: 2px solid blue) -- Brad Fults NeatBox -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian at hixie.ch Fri May 6 08:26:59 2005 From: ian at hixie.ch (Ian Hickson) Date: Fri, 6 May 2005 15:26:59 +0000 (UTC) Subject: [whatwg] Drag and drop in HTML5 In-Reply-To: <1959130b050506004881807b9@mail.gmail.com> References: <427956E8.3090708@edwards.name> <1959130b050506004881807b9@mail.gmail.com> Message-ID: On Fri, 6 May 2005, Brad Fults wrote: > > I don't really see a case outside the datagrid dragging (which is handled > elsewhere) where there would be a need to specify an element as draggable or > as a drag target without scripting in drag behavior. You need to have something to decide if it is an element expecting to be dragged in its entirety or an element where only the selection will be dragged, because otherwise you don't know how to start the drag. > Please feel free to point out cases where another HTML attribute would > have an advantage over a DOM property that could be set directly via > script. It's easier to initialise a content attribute than a DOM attribute. > As for the dragging event model for a single DOM element, I think the > events outlined in the current draft of the spec are a good start. In > addition, however, it would be nice to add some presentational niceties > via CSS pseudo-classes. The CSS aspect of things is separate from the logic side, we'll probably have to deal with the CSS side in the CSS working group. > For the droppable model, it makes sense to have the drag target element > specify either Elements or NodeLists that are droppable. The droppable model implemented by IE and Safari has the potential drop target simply respond to events to say whether things can be dropped or not. In general, though, we want to start simple and only add complexity to this model if use cases warrant it. The model that IE has is complex enough as it is without making it much worse. :-) -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From ianb at colorstudy.com Fri May 6 15:55:13 2005 From: ianb at colorstudy.com (Ian Bicking) Date: Fri, 06 May 2005 17:55:13 -0500 Subject: [whatwg] A thought: Message-ID: <427BF5D1.8050207@colorstudy.com> I was just thinking about the recent problems introduced by the Google Web Accelerator following links that have side effects (the typical [delete this] stuff). One of the issues is that doing the Right Thing means creating a form, and that effects the UI, and of course the nesting form issue and all that. The Web Forms spec deals with this some, with the action attribute for submit buttons and some other details. A related extension might be a method attribute to anchor tags. One might expect [delete this] to do a post request to "form" with a request body of "delete=10". Or it could do a post with an empty request body, but unfortunately a large number of web frameworks ignore URL variables in post requests. The benefit is that this would be easy to apply to current applications, would generally be backward compatible with all user agents (as long as the server respected GET responses), and can be implemented in Javascript fairly easy. And for many applications this is purely a template change, not requiring any server code changes. The Google Web Accelerator will still be broken (the method attribute wouldn't magically appear on all the many applications out there), but at least conscientious web developers would have a fairly simple option to do the right thing. Anyway, just an idea that occurred to me; I tried searching the archives a bit and didn't notice anything on the topic. -- Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org From cbiesinger at web.de Fri May 6 17:34:01 2005 From: cbiesinger at web.de (Christian Biesinger) Date: Sat, 07 May 2005 02:34:01 +0200 Subject: [whatwg] The element and fallback content In-Reply-To: References: <4277BAAD.50105@web.de> Message-ID: <427C0CF9.8010200@web.de> OK, another fallback question: Consider an object that has no attributes that would allow selecting a plugin/content handler. For simplicity, consider an object without any attributes, say: Foo What should be displayed? Should the user agent just fall back to the contents of the object? (Presumably "empty string" as fallback content does not affect the answer to this question either :-) ) -biesi -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 4792 bytes Desc: S/MIME Cryptographic Signature URL: From ian at hixie.ch Fri May 6 17:38:54 2005 From: ian at hixie.ch (Ian Hickson) Date: Sat, 7 May 2005 00:38:54 +0000 (UTC) Subject: [whatwg] The element and fallback content In-Reply-To: <427C0CF9.8010200@web.de> References: <4277BAAD.50105@web.de> <427C0CF9.8010200@web.de> Message-ID: On Sat, 7 May 2005, Christian Biesinger wrote: > > OK, another fallback question: Consider an object that has no > attributes that would allow selecting a plugin/content handler. For > simplicity, consider an object without any attributes, say: > Foo > > What should be displayed? Same as if the were replaced by a . -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From ian at hixie.ch Fri May 6 17:50:22 2005 From: ian at hixie.ch (Ian Hickson) Date: Sat, 7 May 2005 00:50:22 +0000 (UTC) Subject: [whatwg] A thought: In-Reply-To: <427BF5D1.8050207@colorstudy.com> References: <427BF5D1.8050207@colorstudy.com> Message-ID: On Fri, 6 May 2005, Ian Bicking wrote: > > A related extension might be a method attribute to anchor tags. One might > expect [delete this] to do a post > request to "form" with a request body of "delete=10". This has been brought up several times, although I don't remember the past reasonings for it not being added to the spec. The main problem I have with it is that it feels wrong. (Yup, I'm giving really good arguments today!) The element is supposed to be a hyperlink -- but if you say it can be a form submission, that breaks that model. Fundamentally, I feel users should be able to always treat hyperlinks as safe-to-click -- they are links. So I would say that any time an author needs something to have UI that is a submission, it should be clearly submission UI. And that would be a And that's not too bad. If you really didn't want it to look like a button, you could go out of your way to use CSS to do that. If the UA allowed it (if the UA actually allowed that). But one major reasons for buttons not being used (besides currently requiring Javascript) is that they don't look very nice in long lists, so control over appearance is important. But using anchors for actions is so engrained in web developers that it might not be enough of a carrot. > But having said that, a lot of people have asked for this kind of thing. > Should we give up on our ideals in this particular case and just say that > the "method" attribute can change the from being a simple hyperlink to > being part of a submission UI? I must admit I don't know what you mean by "submission UI". If you mean, act like a submit button for the containing form, then no, people use anchors specifically to avoid that. Or do you mean something else? -- Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org From daniel.oconnor at gmail.com Fri May 6 21:20:49 2005 From: daniel.oconnor at gmail.com (Daniel O'Connor) Date: Sat, 7 May 2005 13:50:49 +0930 Subject: [whatwg] A thought: In-Reply-To: <427C181F.3090003@colorstudy.com> References: <427BF5D1.8050207@colorstudy.com> <427C181F.3090003@colorstudy.com> Message-ID: <106cc12005050621205412f0da@mail.gmail.com> Is this perhaps a problem that is solved with rel="nofollow"? I can see where it would be beneficial to have a profile of link relationship types to denote functional links. ie to say "this is a link which is used for editing and administration, don't follow it". That neatly describes the link functionality in a set of known terms, and avoid a lot of the mess with prefetching... On 5/7/05, Ian Bicking wrote: > Ian Hickson wrote: > > On Fri, 6 May 2005, Ian Bicking wrote: > > > >>A related extension might be a method attribute to anchor tags. One might > >>expect [delete this] to do a post > >>request to "form" with a request body of "delete=10". > > > > > > This has been brought up several times, although I don't remember the past > > reasonings for it not being added to the spec. > > > > The main problem I have with it is that it feels wrong. (Yup, I'm giving > > really good arguments today!) The element is supposed to be a > > hyperlink -- but if you say it can be a form submission, that breaks that > > model. Fundamentally, I feel users should be able to always treat > > hyperlinks as safe-to-click -- they are links. > > > > So I would say that any time an author needs something to have UI that is > > a submission, it should be clearly submission UI. And that would be a > > > > And that's not too bad. If you really didn't want it to look like a > button, you could go out of your way to use CSS to do that. If the UA > allowed it (if the UA actually allowed that). But one major reasons for > buttons not being used (besides currently requiring Javascript) is that > they don't look very nice in long lists, so control over appearance is > important. But using anchors for actions is so engrained in web > developers that it might not be enough of a carrot. > > > But having said that, a lot of people have asked for this kind of thing. > > Should we give up on our ideals in this particular case and just say that > > the "method" attribute can change the from being a simple hyperlink to > > being part of a submission UI? > > I must admit I don't know what you mean by "submission UI". If you > mean, act like a submit button for the containing form, then no, people > use anchors specifically to avoid that. Or do you mean something else? > > -- > Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org > -- http://www.ahsonline.com.au/dod/FOAF.rdf From ian at hixie.ch Fri May 6 21:35:35 2005 From: ian at hixie.ch (Ian Hickson) Date: Sat, 7 May 2005 04:35:35 +0000 (UTC) Subject: [whatwg] A thought: In-Reply-To: <427C181F.3090003@colorstudy.com> References: <427BF5D1.8050207@colorstudy.com> <427C181F.3090003@colorstudy.com> Message-ID: On Fri, 6 May 2005, Ian Bicking wrote: > > I'd basically agree. Which perhaps makes the argument stronger -- I > agree, and yet when I'm actually writing an application I frequently do > this anyway ;) This is such a common practice, and at least > method="post" offers a path to get people to move in the right > direction. That's a good point. I've added your suggestion to the list of things for me to look at when I go through the "semantics" stuff again (i.e. element definitions) in the Web Apps 1 (aka "HTML5") spec. > It's not 100% clear to me how you'd do the equivalent with If it was:
Note that using a link for this is somewhat of a hack:
delete this We're making the submission URI a magic string, which is suboptimal at best. I'd feel more comfortable with something like: delete this ...but of course that wouldn't be backwards compatible. > But one major reasons for buttons not being used (besides currently > requiring Javascript) is that they don't look very nice in long lists, > so control over appearance is important. How does this work in native UIs? People don't use links there. Why is this different? > > But having said that, a lot of people have asked for this kind of > > thing. Should we give up on our ideals in this particular case and > > just say that the "method" attribute can change the from being a > > simple hyperlink to being part of a submission UI? > > I must admit I don't know what you mean by "submission UI". If you > mean, act like a submit button for the containing form, then no, people > use anchors specifically to avoid that. Or do you mean something else? That's exactly what I meant. People shouldn't avoid it -- something that looks like a link should be a fricking link. I should see the URI in the status bar and be able to copy it and paste it and open multiple windows and so forth and it should all just be idempotent. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From ianb at colorstudy.com Fri May 6 22:03:32 2005 From: ianb at colorstudy.com (Ian Bicking) Date: Sat, 07 May 2005 00:03:32 -0500 Subject: [whatwg] A thought: In-Reply-To: References: <427BF5D1.8050207@colorstudy.com> <427C181F.3090003@colorstudy.com> Message-ID: <427C4C24.2090006@colorstudy.com> Ian Hickson wrote: >>It's not 100% clear to me how you'd do the equivalent with > > If it was: > >
> > I'm specifically thinking of places where you'd need to use Javascript now. For instance:
1:
delete
2: ... Now, there's also good reasons to submit the entire form for a delete (and saving any changes to other fields), but this isn't the only time this kind of layout makes sense, and because a form's scope is tied to the layout and you can't have nested forms, there's no good way out. My impression from the spec was that the use of