jenkins-bot has submitted this change and it was merged.
Change subject: Move focus event handlers to mmv.ui.Element
......................................................................
Move focus event handlers to mmv.ui.Element
Needed to make sure the download dialog can use the handlers.
Change-Id: If62146f1181f0e722be691f61e5fdc133c9b3795
---
M resources/mmv/ui/mmv.ui.js
M resources/mmv/ui/mmv.ui.reuse.tab.js
2 files changed, 23 insertions(+), 23 deletions(-)
Approvals:
Gilles: Looks good to me, but someone else must approve
MarkTraceur: Looks good to me, approved
jenkins-bot: Verified
diff --git a/resources/mmv/ui/mmv.ui.js b/resources/mmv/ui/mmv.ui.js
index aae3222..3a86b51 100644
--- a/resources/mmv/ui/mmv.ui.js
+++ b/resources/mmv/ui/mmv.ui.js
@@ -219,6 +219,29 @@
} );
};
+ /**
+ * Makes the entire input/textarea selected when focused.
+ * Invoked with that input/textarea as context.
+ */
+ EP.selectAllOnEvent = function () {
+ try {
+ this.select();
+ } catch ( e ) {
+ // IE doesn't like when select() is called during the
onfocus handler
+ }
+ };
+
+ /**
+ * Reduces the action of clicks to solely focusing the input/textarea.
+ * Essentialy disables clicking inside the text to select a portion of
it.
+ * Invoked with that input/textarea as context.
+ */
+ EP.onlyFocus = function ( e ) {
+ this.focus();
+ e.preventDefault();
+ return false;
+ };
+
mw.mmv.ui = {};
mw.mmv.ui.reuse = {};
mw.mmv.ui.Element = Element;
diff --git a/resources/mmv/ui/mmv.ui.reuse.tab.js
b/resources/mmv/ui/mmv.ui.reuse.tab.js
index 4adb32f..1fec1f9 100644
--- a/resources/mmv/ui/mmv.ui.reuse.tab.js
+++ b/resources/mmv/ui/mmv.ui.reuse.tab.js
@@ -52,28 +52,5 @@
this.$pane.removeClass( 'active' );
};
- /**
- * Makes the entire input/textarea selected when focused.
- * Invoked with that input/textarea as context.
- */
- TP.selectAllOnEvent = function () {
- try {
- this.select();
- } catch ( e ) {
- // IE doesn't like when select() is called during the
onfocus handler
- }
- };
-
- /**
- * Reduces the action of clicks to solely focusing the input/textarea.
- * Essentialy disables clicking inside the text to select a portion of
it.
- * Invoked with that input/textarea as context.
- */
- TP.onlyFocus = function ( e ) {
- this.focus();
- e.preventDefault();
- return false;
- };
-
mw.mmv.ui.reuse.Tab = Tab;
}( mediaWiki, jQuery, OO ) );
--
To view, visit https://gerrit.wikimedia.org/r/161996
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If62146f1181f0e722be691f61e5fdc133c9b3795
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <[email protected]>
Gerrit-Reviewer: Gilles <[email protected]>
Gerrit-Reviewer: MarkTraceur <[email protected]>
Gerrit-Reviewer: Pginer <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits