Skip to content
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #65 from AjithLalps/master
Browse files Browse the repository at this point in the history
Jquery version 3 fixes
  • Loading branch information
asofter authored Dec 16, 2017
2 parents 4c94514 + f8b59f3 commit af4a0e8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions assets/redactor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@
if (this.opts.linebreaks)
{
var $next = $formatted.next().next();
if ($next.size() != 0 && $next[0].tagName === 'BR')
if ($next.length != 0 && $next[0].tagName === 'BR')
{
$next.remove();
}
Expand Down Expand Up @@ -1460,7 +1460,7 @@
if (this.start) return;
if (this.rtePaste) return;

if ($(e.target).closest('.redactor-editor, .redactor-toolbar, .redactor-dropdown').size() !== 0)
if ($(e.target).closest('.redactor-editor, .redactor-toolbar, .redactor-dropdown').length !== 0)
{
return;
}
Expand Down Expand Up @@ -3620,7 +3620,7 @@
var last = this.$editor.children().last();
this.$editor.focus();

if (last.size() === 0) return;
if (last.length === 0) return;
if (this.utils.isEmpty(this.$editor.html()))
{

Expand Down Expand Up @@ -5653,7 +5653,7 @@
if (this.utils.browser('mozilla'))
{
var td = $(this.keydown.current).closest('td', this.$editor[0]);
if (td.size() !== 0 && td.text() !== '')
if (td.length !== 0 && td.text() !== '')
{
e.preventDefault();
return false;
Expand Down Expand Up @@ -6433,7 +6433,7 @@
$children.find('br').remove();
$children.append(this.selection.getMarkerAsHtml());

if (this.opts.linebreaks && this.utils.browser('mozilla') && $children.size() == 2 && this.utils.isEmpty($children.eq(1).text()))
if (this.opts.linebreaks && this.utils.browser('mozilla') && $children.length == 2 && this.utils.isEmpty($children.eq(1).text()))
{
$children.eq(1).remove();
}
Expand Down Expand Up @@ -6910,7 +6910,7 @@
inValues = typeof observe['in'] != 'undefined' ? observe['in'] : false,
outValues = typeof observe['out'] != 'undefined' ? observe['out'] : false;

if ($current.closest(element).size() > 0)
if ($current.closest(element).length > 0)
{
this.observe.setDropdownProperties($item, inValues, outValues);
}
Expand Down Expand Up @@ -9544,4 +9544,4 @@
// constructor
Redactor.prototype.init.prototype = Redactor.prototype;

})(jQuery);
})(jQuery);

0 comments on commit af4a0e8

Please sign in to comment.