Skip to content
Snippets Groups Projects
Select Git revision
  • knejad-master-patch-77821
  • js-testing-codeowners-validation
  • knejad-test-gitlab-duo-code-review
  • marioceli-master-patch-67902
  • create-event-for-user_visited_vulnerability_report
  • eduardosanz/configure-2fa-later
  • bl-add-delete-file-to-web-editor-page
  • master default protected
  • 480852-remove-advanced-search-filter-data-js-files
  • morefice/add-initialize-bigint-conversion-keep
  • andrey-remove-unnecessary-inflection
  • vtak/proxy_helm_chart_docs_update
  • 499665-set-projects-organization-id-not-null
  • dpisek/add-html-rendering-capability-to-alert-util
  • sranasinghe-master-patch-4208
  • master-i18n
  • update-workspaces-docs
  • fix/workitem-knn-index-setting
  • 39204-unschedule-project-deletion-on-user-delete
  • block-mrs-that-fix-vue3-specs-that-are-still-quarantined
  • v17.5.0-ee
  • v17.5.0-rc42-ee
  • v17.2.9-ee
  • v17.3.5-ee
  • v17.4.2-ee
  • v17.2.8-ee
  • v17.3.4-ee
  • v17.4.1-ee
  • v17.0.9-rc50-ee
  • v17.2.8-rc50-ee
  • v17.4.1-rc10-ee
  • v17.3.4-rc50-ee
  • v17.1.9-rc50-ee
  • v16.0.10-ee
  • v16.1.8-ee
  • v16.2.11-ee
  • v16.3.9-ee
  • v16.4.7-ee
  • v16.5.10-ee
  • v16.6.10-ee
40 results

merge_request_tabs.js.coffee

  • Robert Speicher's avatar
    e1777f4b
    Prevent a JS error in MergeRequestTabs · e1777f4b
    Robert Speicher authored
    When `window.location.hash` is pointing to a note, e.g. `#note_1234`,
    `scrollToElement` would throw an error because a selector such as
    `.commits #note_1234` doesn't exist, so `offset()` returned `undefined`.
    
    This error would prevent subsequent calls from running, which caused the
    loading spinner to never be hidden.
    
    Now we ensure the selector returns a valid element before trying to
    scroll to it.
    e1777f4b
    History
    Prevent a JS error in MergeRequestTabs
    Robert Speicher authored
    When `window.location.hash` is pointing to a note, e.g. `#note_1234`,
    `scrollToElement` would throw an error because a selector such as
    `.commits #note_1234` doesn't exist, so `offset()` returned `undefined`.
    
    This error would prevent subsequent calls from running, which caused the
    loading spinner to never be hidden.
    
    Now we ensure the selector returns a valid element before trying to
    scroll to it.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.