twitter/bootstrap — Issue #1841: Unexpected behavior of bootstrap-dropdown.js
Author: kastigar
Created: 2012-02-08 16:21:35+00:00
State: open

Hi!

My case: ```dropdown-toggle``` is ```a``` element with ```href``` is set to ```/some/url```. When i click this button it works like a simple link (no dropdowns).

A little investigation shows problem is in attempt to get selector form ```href``` of ```dropdown-toggle```. In my case selector becomes ```/some/url``` and [this line][line]

```javascript
$parent = $(selector)
```

changes document's location to ```/some/url/```.
I think you should add special check for ```href``` value is really selector (starts with ```#```)

[line]: https://github.com/twitter/bootstrap/blob/master/js/bootstrap-dropdown.js#L51