Permalink
Browse files

Merge pull request #2462 from daboe01/pasteboard-type-fix

fixed: cappuccino pasteboad is always clobbered by system pasteboard
  • Loading branch information...
2 parents 5059028 + 95e7a7c commit 0aeccbb02cf611ac447b3dfd04ebb2f55387c880 @mrcarlberg mrcarlberg committed on GitHub Sep 26, 2016
Showing with 6 additions and 4 deletions.
  1. +6 −4 AppKit/Platform/DOM/CPPlatformPasteboard.j
@@ -384,9 +384,10 @@ Return true if the event may be a copy and paste event, but the target is not an
if ([value length])
{
- var pasteboard = [CPPasteboard generalPasteboard];
+ var pasteboard = [CPPasteboard generalPasteboard],
+ cappString = [pasteboard stringForType:CPStringPboardType];
- if ([pasteboard _stateUID] != value)
+ if (cappString != value)
{
[pasteboard declareTypes:[CPStringPboardType] owner:self];
[pasteboard setString:value forType:CPStringPboardType];
@@ -450,9 +451,10 @@ Return true if the event may be a copy and paste event, but the target is not an
if ([value length])
{
- var pasteboard = [CPPasteboard generalPasteboard];
+ var pasteboard = [CPPasteboard generalPasteboard],
+ cappString = [pasteboard stringForType:CPStringPboardType];
- if ([pasteboard _stateUID] != value)
+ if (cappString != value)
{
[pasteboard declareTypes:[CPStringPboardType] owner:self];
[pasteboard setString:value forType:CPStringPboardType];

0 comments on commit 0aeccbb

Please sign in to comment.