Closed miamon closed 10 years ago
Hi @miamon, I'm not sure I understand which ones work and which ones don't.. It seems that you have listed that data-bb-type="button" and data-bb-type="action" data-bb-style="button" both do not work and do work??
Are you saying that if you use a bbUI menu or an action button that is in an overflow that the problem occurs?
Looking at your code... is the call to window.webkitRequestFileSystem failing?
For instance, what happens when you do the following:
window.webkitRequestFileSystem(window.PERSISTENT, 1024 * 1024, onInitFsWriteBackup, errorHandler);
alert('I am here');
Does the "I am here" get run?
Hi Tim, yes are failing on:
But works fine on:
Yes, alert('I am here') run fine.
I tested too with console.log('I am here'); and works fine too.
So if I understand your description, neither onInitFsWriteBackup nor errorHandler is being called?
Yes, onInitFsWriteBackup is not fired and not appears an error on errorHandler
I was able to reproduce this when calling webkitRequestFileSystem from the overflow menu. There may be a webkit bug here.
Wrapping the call in requestAnimationFrame is a work around.
Now works fine. Thanks Tim and Bryan!!
Wow.. really strange... all that happens with the DIV in the overflow is that it is re-parented to a new DIV (the overflow area). The onclick isn't touched in code.
The only other common thing I can think of is that an additional "click" event listener is added to start the animation/transition to hide the menu. Maybe there's some weird animation/event combination issue in webkit that requestAnimationFrame fixes.
Seems exist a conflict between bbui.js and WebWorks SDK 2.0 Gold when you use webkitRequestFileSystem on a data-bb-type="menu" or data-bb-type="action" data-bb-style="button" data-bb-overflow="true"
work fine on data-bb-type="button" and data-bb-type="action" data-bb-style="button"
Just commented here: http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Webworks-2-0-gold-and-webkitRequestFileSystem-for-write-a-file/td-p/2843986
and a complete example of this issue here: https://github.com/miamon/BB10-WebWorks-Samples/tree/master/BfB-Boilerplate-bbUI.js-0.9x
I had this modification: https://github.com/miamon/BB10-WebWorks-Samples/compare/blackberry:master...master