react-diff-view icon indicating copy to clipboard operation
react-diff-view copied to clipboard

Inline-block may cause Chrome's built-in search to fail to match the corresponding content

Open colorpeach opened this issue 5 years ago • 5 comments

https://github.com/otakustay/react-diff-view/blob/72868c24b781b26671eb51b94e203a5c9ccf14e3/src/styles/index.css#L77

Assuming that the rendered code is like this

<td class="diff-code diff-code-insert" style="user-select: auto;">
    <span class="diff-code-edit">
        <span class="token function">onU</span>
    </span>
    <span class="token function">pdat</span>
    <span class="diff-code-edit">
        <span class="token function">e</span>
    </span>
</td>

When I use ctrl+f to search for "onUpdate" on the webpage, I cannot find the above one because the display of .diff-code-edit is inline-block.

I think display: inline-block should be changed to display: inline.

colorpeach avatar Jul 28 '20 03:07 colorpeach

Aware of this issue, but currently I can't find an appropriate solution, inline-flex also breaks search

otakustay avatar Jul 28 '20 04:07 otakustay

But why we are using inline-block, just can't remember, any idea @dancerphil ?

otakustay avatar Jul 28 '20 04:07 otakustay

https://bugs.chromium.org/p/chromium/issues/detail?id=1094588&q=search%20inline-block&can=2

otakustay avatar Jul 28 '20 07:07 otakustay

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 11 '20 08:08 stale[bot]

already fixed in #200

ensorrow avatar Jun 30 '23 08:06 ensorrow