aboutsummaryrefslogtreecommitdiffstats
path: root/src/scenario/Scenario.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/scenario/Scenario.js')
-rw-r--r--src/scenario/Scenario.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/scenario/Scenario.js b/src/scenario/Scenario.js
index d1f1eb33..81c85a61 100644
--- a/src/scenario/Scenario.js
+++ b/src/scenario/Scenario.js
@@ -256,6 +256,12 @@ function browserTrigger(element, type) {
element.checked = !element.checked;
break;
}
+ // WTF!!! Error: Unspecified error.
+ // Don't know why, but some elements when detached seem to be in inconsistent state and
+ // calling .fireEvent() on them will result in very unhelpful error (Error: Unspecified error)
+ // forcing the browser to compute the element position (by reading its CSS)
+ // puts the element in consistent state.
+ element.style.posLeft;
element.fireEvent('on' + type);
if (lowercase(element.type) == 'submit') {
while(element) {