Fixing bug 313027, can't drag plain text url to the tab bar. Patch by smfr, r=stuart.morgan, sr=pink

This commit is contained in:
nick.kreeger%park.edu 2006-08-12 18:24:07 +00:00
parent e5811f54c8
commit 6c34bd677a

View File

@ -231,8 +231,10 @@ NSString* const kWebURLsWithTitlesPboardType = @"WebURLsWithTitlesPboardType";
return YES;
if ([types containsObject:NSStringPboardType]) {
// NSURL will return nil for invalid url strings (containing spaces, returns etc),
// but will return a url otherwise.
NSURL* testURL = [NSURL URLWithString:[self stringForType:NSStringPboardType]];
return (testURL != nil) && ([[testURL scheme] length] > 0);
return (testURL != nil);
}
return NO;