Select text with double click is selecting wrong text

时间:2017-06-19 14:00:34

标签: html css angularjs

So I have a web application that has a panel area. This area contains a text that can be copied to the clipboard. The problem is that every time I select this text (with 3 left button clicks) the text from the button bellow is also selected.

enter image description here

From the image above, if I select the TEXT TO COPY and Ctrl+C I will get the following clipboard (which is wrong):

TEXT TO COPY

CLICK ME

This is the HTML code where this is inserted.

<div class="panel panel-default">
    <div class="panel-body wrapped-pannel">
        <table>
            <tr>
                <td>TEXT TO COPY</td>
            </tr>
        </table>
    </div>
</div>
    
<form class="form-horizontal" role="form" novalidate>
    <div style="clear: both"></div>
    <div class="form-group">
        <div class="col-md-3">
            <button class="btn btn-primary"
                    ng-show="canclick">
                CLICK ME
            </button>

            <button class="btn btn-default">
                BACK
            </button>
        </div>
    </div>
</form>

Can anyone understand why is this happening? Many thanks.

0 个答案:

没有答案