Rollback recursion fix

This should no longer be necessary with the new third party code used in rich editor
Refs #1733
This commit is contained in:
Samuel Georges 2016-05-25 05:26:50 +10:00
parent 6b8f7b0dd9
commit 887bf569dc
2 changed files with 2 additions and 15 deletions

View File

@ -173,9 +173,7 @@ if($item.data('item-type')=='folder'){if(!$item.data('clear-search'))
this.gotoFolder($item.data('path'))
else{this.resetSearch()
this.gotoFolder($item.data('path'),true)}}
else if($item.data('item-type')=='file'){var $html=$(document.documentElement)
if($html.hasClass('safari')&&!$html.hasClass('chrome')){return}
this.$el.trigger('popupcommand',['insert'])}}
else if($item.data('item-type')=='file'){this.$el.trigger('popupcommand',['insert'])}}
MediaManager.prototype.isPreviewSidebarVisible=function(){return!this.$el.find('[data-control="preview-sidebar"]').hasClass('hide')}
MediaManager.prototype.toggleSidebar=function(ev){var isVisible=this.isPreviewSidebarVisible(),$sidebar=this.$el.find('[data-control="preview-sidebar"]'),$button=$(ev.target)
if(!isVisible){$sidebar.removeClass('hide')

View File

@ -413,19 +413,8 @@
}
}
else if ($item.data('item-type') == 'file') {
// Trigger the Insert popup command if a file item
// Trigger the Insert popup command if a file item
// was double clicked or Enter key was pressed.
var $html = $(document.documentElement)
if ($html.hasClass('safari') && !$html.hasClass('chrome')) {
// Inserting media/link in Safari with Enter key and double click
// is buggy. It causes endless recursion inside the rich editor
// third-party code.
// See https://github.com/octobercms/october/issues/1733
return
}
this.$el.trigger('popupcommand', ['insert'])
}
}