{"id":348,"date":"2007-03-21T08:23:14","date_gmt":"2007-03-21T14:23:14","guid":{"rendered":"http:\/\/blog.codedread.com\/archives\/2007\/03\/21\/cell-selection-in-browsers\/"},"modified":"2007-03-21T08:23:14","modified_gmt":"2007-03-21T14:23:14","slug":"cell-selection-in-browsers","status":"publish","type":"post","link":"https:\/\/www.codedread.com\/blog\/archives\/2007\/03\/21\/cell-selection-in-browsers\/","title":{"rendered":"Cell Selection In Browsers"},"content":{"rendered":"<p>I think it would be really cool if web browsers would allow me to select cells in a HTML table in a logical way:  The same way cell selection works in Microsoft Excel.  All browsers that I know about presume I'm selecting a \"text blob\" and that means if I click in a table cell and drag downwards, it will include the entire next row of the table in my selection.  But 99% of the time, I'd really like selection in HTML tables to work at the cell-level (that means dragging down would only select the cell underneath the initial one).  <!--more--><\/p>\n<p>I'm too lazy to look at what the <a href=\"http:\/\/www.w3.org\/TR\/html4\/\">HTML 4.01<\/a> spec say about this \ud83d\ude09  Is selection forced to treat things like lines of text?  If so, what about the <a href=\"http:\/\/www.whatwg.org\/specs\/web-apps\/current-work\/\">WHATWG HTML5<\/a> spec?  If so, can the revitalized <a href=\"http:\/\/www.w3.org\/MarkUp\/\">W3C HTML Working Group<\/a> do something about this in the next spec?  Thinking about it a little, it doesn't seem like it's necessary to specify anything about selection in the specs, the browsers should be free to implement things as best they see fit.<\/p>\n<p>There would also have to be a way to select an entire row or entire column in the HTML table too (use Microsoft Excel or Microsoft Word's table as a starting point for how that UI should work).<\/p>\n<p>What would this mean for copying\/pasting though?  If I select two cells aligned vertically in a table, would it paste it as plain text with a newline between the contents?  I'll let the smart people deal with that...<\/p>\n<p><i>[Update: <a href=\"http:\/\/ln.hixie.ch\/\">Ian Hickson<\/a> pointed out that Ctrl+drag is the way to do what I'm after in Firefox (too bad it doesn't work in Opera).  However, I later <a href=\"http:\/\/blog.codedread.com\/archives\/2007\/03\/21\/cell-selection-in-browsers\/?preview=true#comment-11950\">commented <\/a> that the pasting in such circumstances poses a problem.  Looks like <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=236546\">Bug 236546<\/a> is the key to my happiness, go vote!]<\/i><\/p>\n<p><script type=\"text\/javascript\" src=\"http:\/\/www.codedread.com\/googleads.js\"><\/script><br \/>\n<script type=\"text\/javascript\" src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I think it would be really cool if web browsers would allow me to select cells in a HTML table in a logical way: The same way cell selection works in Microsoft Excel. All browsers that I know about presume I&#8217;m selecting a &#8220;text blob&#8221; and that means if I click in a table cell [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,11,28],"tags":[],"class_list":["post-348","post","type-post","status-publish","format-standard","hentry","category-software","category-technology","category-web"],"_links":{"self":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts\/348","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/comments?post=348"}],"version-history":[{"count":0,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts\/348\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/media?parent=348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/categories?post=348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/tags?post=348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}