Open BenJenkinson opened 10 months ago
Hi there,
Just checking in, has anyone taken a look at this issue?
Hi @BenJenkinson - Thank you for your report. We've opened a ticket in Jira for the dev team to review. Once the Jira task, BBOX-1206, is resolved we'll report back here.
Describe the bug
The
onPreview
andonTogglePreview
events/callbacks don't seem to be fired in a consistent way.To Reproduce
Several scenarios are described below, along with the execution order & values provided to the callbacks:
false
true
onPreview
not called?true
false
onPreview
not called?false
togglePreview()
true
true
togglePreview()
false
onTogglePreview
called twice? with incorrect value?📚 Documentation
The Beefree docs describe the events as:
onPreview
status
(boolean)onTogglePreview
status
(boolean)Bugs?
The descriptions in the documentation don't seem to describe the observed behaviour of the events:
onPreview
is only meant to be fired when the button is pressed, why does it fire whentogglePreview()
is called? (Scenario: 3, 4)onTogglePreview
is only meant to be fired when the preview is opened or closed, why doesn't it fire when the "Preview" button is clicked on the toolbar? (Scenario: 1, 2)status
variable, but the variable doesn't seem to reflect the current state of the editor? (Scenario 4)onTogglePreview
fire twice? (Scenario 4)onTogglePreview
fire with the wrong value? (Scenario 4)