mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
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:
parent
6b8f7b0dd9
commit
887bf569dc
@ -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')
|
||||
|
@ -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'])
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user