DLynch has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/374563 )
Change subject: MWLinkAnnotationInspector: check input validity when switching
modes
......................................................................
MWLinkAnnotationInspector: check input validity when switching modes
Focusing a TextInputWidget normally unsets validity. However, because we're
kind of pretending this is the same input, just in a different mode, it
doesn't make sense to the user that the focus behavior occurs. So, make it
recheck validity after we switch.
Bug: T172159
Change-Id: I1d9d6670d72483c7510fd5ed3c539b43af8432bf
---
M modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/63/374563/1
diff --git a/modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js
b/modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js
index 1870e96..b1ba81d 100644
--- a/modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js
+++ b/modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js
@@ -299,6 +299,10 @@
// 2. User clicks external link tab (unnecessary, because we'd
auto-switch, but the user doesn't know that)
// 3. User pastes a link, intending to replace the existing prefilled
link
this.annotationInput.getTextInputWidget().$input[ 0
].setSelectionRange( 0, end );
+ // Focusing a TextInputWidget normally unsets validity. However, because
+ // we're kind of pretending this is the same input, just in a different
+ // mode, it doesn't make sense to the user that the focus behavior
occurs.
+ this.annotationInput.getTextInputWidget().setValidityFlag();
this.updateActions();
};
--
To view, visit https://gerrit.wikimedia.org/r/374563
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d9d6670d72483c7510fd5ed3c539b43af8432bf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits