Lucas_Werkmeister_WMDE added a comment.
Here’s a very hacky Vector patch to suppress the default navigation to
Special:Search and instead navigate to the search result’s URL:
diff --git a/resources/skins.vector.search/App.vue
b/resources/skins.vector.search/App.vue
index 3bffb5c52e..f946cf0078 100644
--- a/resources/skins.vector.search/App.vue
+++ b/resources/skins.vector.search/App.vue
@@ -189,6 +189,8 @@ module.exports = exports = defineComponent( {
this.wprov = instrumentation.getWprovFromResultIndex(
event.index );
instrumentation.listeners.onSubmit( event );
+
+ window.location = event.searchResult.url;
},
onFocus() {
@@ -200,6 +202,8 @@ module.exports = exports = defineComponent( {
}
},
mounted() {
+ this.$el.querySelector( 'form' ).addEventListener( 'submit', (
e ) => e.preventDefault() );
+
if ( this.autofocusInput ) {
this.$refs.searchForm.focus();
nextTick( () => {
But I assume we can’t do it like that, this `wprov` stuff is probably there
for a reason…
TASK DETAIL
https://phabricator.wikimedia.org/T316093
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Lucas_Werkmeister_WMDE
Cc: Lucas_Werkmeister_WMDE, jhsoby, Aklapper, Michael, Astuthiodit_1,
karapayneWMDE, Invadibot, maantietaja, ItamarWMDE, Akuckartz, Nandana, Lahi,
Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS,
Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]