Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rendercanvas/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# This is the base version number, to be bumped before each release.
# The build system detects this definition when building a distribution.
__version__ = "2.7.0"
__version__ = "2.7.1"

# Set this to your library name
project_name = "rendercanvas"
Expand Down
8 changes: 5 additions & 3 deletions rendercanvas/anywidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ def snapshot(self, *, pixel_ratio=None):
),
display_id=True,
)
self.request_draw()

self._rfb_schedule_maybe_draw()

def _replace_snapshot(self, array):
pending_display = self._rfb_pending_snapshot_display
Expand Down Expand Up @@ -187,8 +188,9 @@ def _rfb_maybe_draw(self):
should_draw = (
self._rfb_draw_requested
and frames_in_flight < self._max_buffered_frames
and (self._has_visible_views or self._rfb_pending_snapshot_display)
)
and self._has_visible_views
) or self._rfb_pending_snapshot_display is not None

# Do the draw if we should.
if should_draw:
self._rfb_draw_requested = False
Expand Down
4 changes: 3 additions & 1 deletion rendercanvas/core/renderview.js
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,10 @@ class BaseRenderView {

viewElement.addEventListener('pointerdown', (ev) => {
// When pointer is down, set focus to the focus-element.
// Focus after a short delay, otherwise VSCode takes focus away immediately.
if (!LOOKS_LIKE_MOBILE) {
this._focusElement.focus({ preventScroll: true, focusVisible: false })
const fe = this._focusElement
window.setTimeout(function () { fe.focus({ preventScroll: true, focusVisible: false }) }, 50)
}
// capture the pointing device.
// Because we capture the event, there will be no other events when buttons are pressed down,
Expand Down
Loading