Set tooltips to have default boundary viewport
This commit is contained in:
parent
1c17aafa76
commit
ebf5f31d8c
3 changed files with 8 additions and 2 deletions
|
@ -69,9 +69,10 @@ export default () => {
|
|||
|
||||
gl.diffNotesCompileComponents();
|
||||
|
||||
if (!hasVueMRDiscussionsCookie()) {
|
||||
const resolveCountAppEl = document.querySelector('#resolve-count-app');
|
||||
if (!hasVueMRDiscussionsCookie() && resolveCountAppEl) {
|
||||
new Vue({
|
||||
el: '#resolve-count-app',
|
||||
el: resolveCountAppEl,
|
||||
components: {
|
||||
'resolve-count': ResolveCount
|
||||
},
|
||||
|
|
|
@ -144,6 +144,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
$body.tooltip({
|
||||
selector: '.has-tooltip, [data-toggle="tooltip"]',
|
||||
trigger: 'hover',
|
||||
boundary: 'viewport',
|
||||
placement(tip, el) {
|
||||
return $(el).data('placement') || 'bottom';
|
||||
},
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
shared_examples 'reportable note' do |type|
|
||||
include MobileHelpers
|
||||
include NotesHelper
|
||||
|
||||
let(:comment) { find("##{ActionView::RecordIdentifier.dom_id(note)}") }
|
||||
|
@ -39,6 +40,9 @@ shared_examples 'reportable note' do |type|
|
|||
end
|
||||
|
||||
def open_dropdown(dropdown)
|
||||
# make window wide enough that tooltip doesn't trigger horizontal scrollbar
|
||||
resize_window(1200, 800)
|
||||
|
||||
dropdown.find('.more-actions-toggle').click
|
||||
dropdown.find('.dropdown-menu li', match: :first)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue