rniemeyer / knockout-sortable

A Knockout.js binding to connect observableArrays with jQuery UI sortable functionality
MIT License
548 stars 128 forks source link

hasFocus binding not working #171

Open derrickb opened 8 years ago

derrickb commented 8 years ago

Hello, there seems to be a couple old issues posted about related problems but there isn't a solid solution, or the jsfiddles no longer work:

106

96

Here's an updated, simple jsfiddle demonstrating click-to-edit not working as expected: https://jsfiddle.net/derrickb/v6jwafy7/

Click on one of the click-to-edit texts, then try clicking on the sibling text lines. The input does not lose focus.

The only solution I've found is extremely hacky: I add a click binding to almost all elements that make sure that the previous element loses focus. It would be great to have hasFocus working as intended in knockout-sortable, the way it does in regular knockout.