This can simply solve the copy & paste issue, but this will cause an extreme performance dropdown since it involves multiple table layouts, also it could probably incompatible with customizations such as `widgets`, `renderGutter` and `Decoration`, I mostly will not use this fix.
This can simply solve the copy & paste issue, but this will cause an extreme performance dropdown since it involves multiple table layouts, also it could probably incompatible with customizations such as widgets, renderGutter and Decoration, I mostly will not use this fix.
Originally posted by @otakustay in https://github.com/otakustay/react-diff-view/issues/62#issuecomment-520705178
can add classname to distinguish both side.. listen which side mousedown ,other side can stop user-select or can support to distinguish side?
We're already doing "classnames to distinguish both side" and "listen which side mousedown" and "add user-select: none to the other side", the problem is user-select: none does not prevent text from being copied.
We're already doing "classnames to distinguish both side" and "listen which side mousedown" and "add
user-select: noneto the other side", the problem isuser-select: nonedoes not prevent text from being copied.
why is that?May I know when you can support to distinguish both side ?I'm in a hurry....please...thank you
This is already supported in events, by passing custom events to diff component, event callback receives a context object as its argument, this object is {side, change} in which side is either old or new
side emmm..I hope it can be distinguished from label..when mousedown i can known which side
onMouseDown in codeEvents and gutterEvents props supports the context object with side property in it, you can try it
onMouseDown in codeEvents and gutterEvents props supports the context object with side property in it, you can try it
my problem is resolved..thank you very much