fix bug that scrollbar steals input focus(#344)

This commit is contained in:
Jinhao
2018-12-06 07:41:02 +08:00
parent f4c71db98b
commit 48d3f4f044
2 changed files with 3 additions and 2 deletions

View File

@@ -190,6 +190,9 @@ namespace nana
widget_ = static_cast< ::nana::scroll<Vertical>*>(&widget);
widget.caption("nana scroll");
//scroll doesn't want the keyboard focus.
API::take_active(widget, false, widget.parent());
timer_.stop();
timer_.elapse(std::bind(&trigger::_m_tick, this));
}