Test fixes.
This commit is contained in:
parent
619b43ffa4
commit
12b2ee9356
1 changed files with 15 additions and 16 deletions
|
|
@ -134,12 +134,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
Diff2HtmlUI.prototype._initSelection = function() {
|
Diff2HtmlUI.prototype._initSelection = function() {
|
||||||
var body = $('body'),
|
var body = $('body');
|
||||||
that = this;
|
var that = this;
|
||||||
|
|
||||||
body.on('mousedown', '.d2h-diff-table', function(event) {
|
body.on('mousedown', '.d2h-diff-table', function(event) {
|
||||||
var target = $(event.target),
|
var target = $(event.target);
|
||||||
table = target.closest('.d2h-diff-table');
|
var table = target.closest('.d2h-diff-table');
|
||||||
|
|
||||||
if (target.closest('.d2h-code-line,.d2h-code-side-line').length) {
|
if (target.closest('.d2h-code-line,.d2h-code-side-line').length) {
|
||||||
table.removeClass('selecting-left');
|
table.removeClass('selecting-left');
|
||||||
|
|
@ -162,13 +162,12 @@
|
||||||
|
|
||||||
|
|
||||||
Diff2HtmlUI.prototype._getSelectedText = function() {
|
Diff2HtmlUI.prototype._getSelectedText = function() {
|
||||||
var table = $('.d2h-diff-table'),
|
var table = $('.d2h-diff-table');
|
||||||
sel = window.getSelection(),
|
var sel = window.getSelection();
|
||||||
range = sel.getRangeAt(0),
|
var range = sel.getRangeAt(0);
|
||||||
doc = range.cloneContents(),
|
var doc = range.cloneContents();
|
||||||
nodes = doc.querySelectorAll('tr'),
|
var nodes = doc.querySelectorAll('tr');
|
||||||
text = '';
|
var text = '';
|
||||||
|
|
||||||
var idx = currentSelectionColumnId;
|
var idx = currentSelectionColumnId;
|
||||||
|
|
||||||
if (nodes.length === 0) {
|
if (nodes.length === 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue