[MediaWiki-commits] [Gerrit] Remove explicit setting of the width of the textarea - change (mediawiki...CodeEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Remove explicit setting of the width of the textarea .. Remove explicit setting of the width of the textarea The setting of the width is not necessary and sometimes it generates a width which is to wide. Bug: T102736 Change-Id: I7ed715fba4d65e7a571421b7a06d604e6b0958f7 --- M modules/jquery.codeEditor.js 1 file changed, 2 insertions(+), 8 deletions(-) Approvals: TheDJ: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/jquery.codeEditor.js b/modules/jquery.codeEditor.js index cef2f21..808ce33 100644 --- a/modules/jquery.codeEditor.js +++ b/modules/jquery.codeEditor.js @@ -309,7 +309,7 @@ * Sets up the iframe in place of the textarea to allow more advanced operations */ 'setupCodeEditor': function () { - var box, lang, basePath, container, editdiv, session, resize, AceLangMode; + var box, lang, basePath, container, editdiv, session, AceLangMode; box = context.$textarea; lang = mw.config.get( 'wgCodeEditorCurrentLanguage' ); @@ -330,8 +330,7 @@ editdiv = container.find( '.editor' ); box.css( 'display', 'none' ); - container.width( box.width() ) - .height( box.height() ); + container.height( box.height() ); // Non-lazy loaded dependencies: Enable code completion ace.require( 'ace/ext/language_tools' ); @@ -380,11 +379,6 @@ session.setMode( new AceLangMode() ); } ); - // Force the box to resize horizontally to match in future :D - resize = function () { - container.width( box.width() ); - }; - $( window ).resize( resize ); // Use jquery.ui.resizable so user can make the box taller too container.resizable( { handles: 's', -- To view, visit https://gerrit.wikimedia.org/r/218816 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7ed715fba4d65e7a571421b7a06d604e6b0958f7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CodeEditor Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader gerritpatchuploa...@gmail.com Gerrit-Reviewer: Gerrit Patch Uploader gerritpatchuploa...@gmail.com Gerrit-Reviewer: TheDJ hartman.w...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove explicit setting of the width of the textarea - change (mediawiki...CodeEditor)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/218816 Change subject: Remove explicit setting of the width of the textarea .. Remove explicit setting of the width of the textarea The setting of the width is not necessary and sometimes it generates a width which is to wide. Bug: T102736 Change-Id: I7ed715fba4d65e7a571421b7a06d604e6b0958f7 --- M modules/jquery.codeEditor.js 1 file changed, 2 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeEditor refs/changes/16/218816/1 diff --git a/modules/jquery.codeEditor.js b/modules/jquery.codeEditor.js index cef2f21..808ce33 100644 --- a/modules/jquery.codeEditor.js +++ b/modules/jquery.codeEditor.js @@ -309,7 +309,7 @@ * Sets up the iframe in place of the textarea to allow more advanced operations */ 'setupCodeEditor': function () { - var box, lang, basePath, container, editdiv, session, resize, AceLangMode; + var box, lang, basePath, container, editdiv, session, AceLangMode; box = context.$textarea; lang = mw.config.get( 'wgCodeEditorCurrentLanguage' ); @@ -330,8 +330,7 @@ editdiv = container.find( '.editor' ); box.css( 'display', 'none' ); - container.width( box.width() ) - .height( box.height() ); + container.height( box.height() ); // Non-lazy loaded dependencies: Enable code completion ace.require( 'ace/ext/language_tools' ); @@ -380,11 +379,6 @@ session.setMode( new AceLangMode() ); } ); - // Force the box to resize horizontally to match in future :D - resize = function () { - container.width( box.width() ); - }; - $( window ).resize( resize ); // Use jquery.ui.resizable so user can make the box taller too container.resizable( { handles: 's', -- To view, visit https://gerrit.wikimedia.org/r/218816 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ed715fba4d65e7a571421b7a06d604e6b0958f7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CodeEditor Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader gerritpatchuploa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits