Closed Bug 332588 Opened 19 years ago Closed 18 years ago

Dropping link in single line input opens multiline input

Categories

(Other Applications :: ChatZilla, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rdmsoft, Assigned: Gijs)

Details

(Whiteboard: [cz-0.9.78])

Attachments

(1 file)

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.
Attached patch Hacky patchSplinter Review
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 :-)
Assignee: rdmsoft → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Attachment #246029 - Flags: review?(silver)
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[0].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.
Attachment #246029 - Flags: review?(silver) → review+
// 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
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [cz-0.9.78]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: