New tooltip stays on mobile
Summary
As you can see in the screenshot on mobile there is a "New..." tooltip on the "+" button. All the other dropdowns don´t have a tooltip and it behaves very strange. It simply stays if the user does not tap somewhere else which is quite annoying. And it also stays visible it you switch back via the "x".
Relevant logs and/or screenshots
Another example (FF on Windows with small viewport):
Implementation guide
Hide the tooltip when the New button is clicked. That ensures the tooltip doesn’t stay opened at the same time as the dropdown. Here’s an example of how to do this:
diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js
index 32ecc0036bd..a728f46966a 100644
--- a/app/assets/javascripts/main.js
+++ b/app/assets/javascripts/main.js
@@ -308,4 +308,10 @@ document.addEventListener('DOMContentLoaded', () => {
import { hide } from '~/tooltips';
$('.gl-show-field-errors').each((i, form) => new GlFieldErrors(form));
requestIdleCallback(deferredInitialisation);
+
+ const target = document.querySelector('#js-onboarding-new-project-link');
+
+ target.addEventListener('click', () => {
+ hide(target);
+ });
});
Edited by Enrique Alcántara