Prtksxna has uploaded a new change for review.
https://gerrit.wikimedia.org/r/281638
Change subject: ButtonWidget: Remove code to not let the button get focus after
clicking
......................................................................
ButtonWidget: Remove code to not let the button get focus after clicking
Bug: T76636
Change-Id: Ia8d55fbb2aa950447eacb0776c249ed76346d391
---
M src/widgets/ButtonWidget.js
1 file changed, 7 insertions(+), 24 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/38/281638/1
diff --git a/src/widgets/ButtonWidget.js b/src/widgets/ButtonWidget.js
index 5760412..981cbd1 100644
--- a/src/widgets/ButtonWidget.js
+++ b/src/widgets/ButtonWidget.js
@@ -81,31 +81,14 @@
OO.mixinClass( OO.ui.ButtonWidget, OO.ui.mixin.TabIndexedElement );
OO.mixinClass( OO.ui.ButtonWidget, OO.ui.mixin.AccessKeyedElement );
+/* Static Properties */
+
+/**
+ * @inheritdoc
+ */
+OO.ui.ButtonWidget.static.cancelButtonMouseDownEvents = false;
+
/* Methods */
-
-/**
- * @inheritdoc
- */
-OO.ui.ButtonWidget.prototype.onMouseDown = function ( e ) {
- if ( !this.isDisabled() ) {
- // Remove the tab-index while the button is down to prevent the
button from stealing focus
- this.$button.removeAttr( 'tabindex' );
- }
-
- return OO.ui.mixin.ButtonElement.prototype.onMouseDown.call( this, e );
-};
-
-/**
- * @inheritdoc
- */
-OO.ui.ButtonWidget.prototype.onMouseUp = function ( e ) {
- if ( !this.isDisabled() ) {
- // Restore the tab-index after the button is up to restore the
button's accessibility
- this.$button.attr( 'tabindex', this.tabIndex );
- }
-
- return OO.ui.mixin.ButtonElement.prototype.onMouseUp.call( this, e );
-};
/**
* Get hyperlink location.
--
To view, visit https://gerrit.wikimedia.org/r/281638
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia8d55fbb2aa950447eacb0776c249ed76346d391
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Prtksxna <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits