For focus problems see Issue #255 and Issue #535.
| 283 | |
| 284 | |
| 285 | class FocusHandler(object): |
| 286 | """For focus problems see Issue #255 and Issue #535. """ |
| 287 | |
| 288 | def __init__(self, browser_frame): |
| 289 | self.browser_frame = browser_frame |
| 290 | |
| 291 | def OnTakeFocus(self, next_component, **_): |
| 292 | logger.debug("FocusHandler.OnTakeFocus, next={next}" |
| 293 | .format(next=next_component)) |
| 294 | |
| 295 | def OnSetFocus(self, source, **_): |
| 296 | logger.debug("FocusHandler.OnSetFocus, source={source}" |
| 297 | .format(source=source)) |
| 298 | if LINUX: |
| 299 | return False |
| 300 | else: |
| 301 | return True |
| 302 | |
| 303 | def OnGotFocus(self, **_): |
| 304 | logger.debug("FocusHandler.OnGotFocus") |
| 305 | if LINUX: |
| 306 | self.browser_frame.focus_set() |
| 307 | |
| 308 | |
| 309 | class NavigationBar(tk.Frame): |