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() {
|
||||
var body = $('body'),
|
||||
that = this;
|
||||
var body = $('body');
|
||||
var that = this;
|
||||
|
||||
body.on('mousedown', '.d2h-diff-table', function(event) {
|
||||
var target = $(event.target),
|
||||
table = target.closest('.d2h-diff-table');
|
||||
var target = $(event.target);
|
||||
var table = target.closest('.d2h-diff-table');
|
||||
|
||||
if (target.closest('.d2h-code-line,.d2h-code-side-line').length) {
|
||||
table.removeClass('selecting-left');
|
||||
|
|
@ -162,13 +162,12 @@
|
|||
|
||||
|
||||
Diff2HtmlUI.prototype._getSelectedText = function() {
|
||||
var table = $('.d2h-diff-table'),
|
||||
sel = window.getSelection(),
|
||||
range = sel.getRangeAt(0),
|
||||
doc = range.cloneContents(),
|
||||
nodes = doc.querySelectorAll('tr'),
|
||||
text = '';
|
||||
|
||||
var table = $('.d2h-diff-table');
|
||||
var sel = window.getSelection();
|
||||
var range = sel.getRangeAt(0);
|
||||
var doc = range.cloneContents();
|
||||
var nodes = doc.querySelectorAll('tr');
|
||||
var text = '';
|
||||
var idx = currentSelectionColumnId;
|
||||
|
||||
if (nodes.length === 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue