Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !2336

If there is a form on a item on the dropdown menu, don't toggle the visibility of the menu.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/mariocesar/patch-2 into master Feb 29, 2012
  • Overview 0
  • Commits 3
  • Pipelines 0
  • Changes 3

Created by: mariocesar

This is a simple enhancement, that feels just to be a good default behavior for the dropdown library.

As the twitter account menu it self on the homepage, it has a login form as a item of the menu, while the user writes his username and passwords, it's incorrect that the menu hides on when selecting the form.

The feature is do by just disabling the click event on any form inside the dropdown menu.

  $parent.find('form').click(function(event){
    event.stopPropagation();
  });

Optionally will be good, after stopping the propagation of the click on the form, that can be trigger again if the click event comes from a button tag:

  $parent.find('form button').click(function(event) {
    $parent.trigger('click');
  });

I'm not so sure if this will be a good behavior.

Maybe is the best, just to stop the propagation on the items that the user needs for input, like input, select and option tags.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/mariocesar/patch-2