Tweichart has uploaded a new change for review. https://gerrit.wikimedia.org/r/150227
Change subject: inserting a document now results in an insertion at the cursor, inserted at the start of the document before (ie11) ...................................................................... inserting a document now results in an insertion at the cursor, inserted at the start of the document before (ie11) Change-Id: I49eb5937446e689af06b9138bea1bdbeb0f35f23 --- M InsertFile/resources/bluespice.insertFile.js 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/27/150227/1 diff --git a/InsertFile/resources/bluespice.insertFile.js b/InsertFile/resources/bluespice.insertFile.js index aebb41a..d97c335 100644 --- a/InsertFile/resources/bluespice.insertFile.js +++ b/InsertFile/resources/bluespice.insertFile.js @@ -153,9 +153,7 @@ Ext.require('BS.InsertFile.ImageDialog', function(){ BS.InsertFile.ImageDialog.clearListeners(); BS.InsertFile.ImageDialog.on( 'ok', function( sender, data ) { - var editor = plugin.getEditor(); editor.selection.moveToBookmark(bookmark); - var node = editor.selection.getNode(); var imgAttrs = this.plugins.bswikicode.makeDefaultImageAttributesObject(); var formattedNamespaces = mw.config.get('wgFormattedNamespaces'); //Manually prefix with NS_IMAGE. I wonder if this should @@ -228,6 +226,8 @@ commandId: 'mceBsFile', commandCallback: function() { var anchor = this.selection.getNode(); + var editor = plugin.getEditor(); + var bookmark = editor.selection.getBookmark(); var params = { caption: this.selection.getContent(), displayText: this.selection.getContent() @@ -246,6 +246,7 @@ Ext.require('BS.InsertFile.FileDialog', function(){ BS.InsertFile.FileDialog.clearListeners(); BS.InsertFile.FileDialog.on( 'ok', function(sender, data) { + editor.selection.moveToBookmark(bookmark); var formattedNamespaces = mw.config.get('wgFormattedNamespaces'); var nsText = formattedNamespaces[bs.ns.NS_MEDIA]; var prefixedTitle = nsText + ':' + data.title; @@ -266,7 +267,7 @@ } else { newAnchor = this.dom.createHTML( 'a', anchorAttrs, displayText ); - this.insertContent(newAnchor); + editor.insertContent(newAnchor); } this.selection.collapse(false); }, this); -- To view, visit https://gerrit.wikimedia.org/r/150227 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I49eb5937446e689af06b9138bea1bdbeb0f35f23 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Tweichart <weich...@hallowelt.biz> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits