text/x-moz-url data (URL\nTitle) dropped into the single line input box used to just lose the title, which was okay. The drop handler (bug 307774) handles both lines as-is, which is annoying. It should either discard the title, or arrange the URL and title on one line to avoid opening the multiline box.
Created attachment 246029 [details] [diff] [review] Hacky patch I don't like this patch very much. I don't think we can do anything better, because the transferrable is sucky that way and will not tell us it also supports x-moz-url. That is, if you ask it to enumerate all the flavours, it magically forgot about x-moz-url, at least in my testing. In other words, we're kind of screwed, hence the hack. Fortunately this also seems to work just fine :-)
Waaa, that's horrible. What happens if you do data.getTransferData on the URL type? Does that give you anything?
Comment on attachment 246029 [details] [diff] [review] Hacky patch >Index: mozilla/extensions/irc/xul/content/handlers.js >+ var lines = str.value.data.split("\n"); >+ var m = lines.match(client.linkRE); Please add a giant XXX comment here about the transferable not having the special URL type and that this is a hack. r=silver with that added.
// XXX part of what follows is a very ugly hack to make links (with a title) // not open the multiline box. We 'should' be able to ask the transferable // what flavours it supports, but testing showed that by the time we can ask // for that info, it's forgotten about everything apart from text/unicode. Checking in mozilla/extensions/irc/xul/content/handlers.js; /cvsroot/mozilla/extensions/irc/xul/content/handlers.js,v <-- handlers.js new revision: 1.140; previous revision: 1.139 done