blackberry / bes10-cascades Goto Github PK
View Code? Open in Web Editor NEWCascades-based Samples for the Enterprise; BlackBerry 10 client and BES10 server
Cascades-based Samples for the Enterprise; BlackBerry 10 client and BES10 server
The mousedown event will block the mouseup and click events from firing properly if the dom is modified during a mousedown handler. I first noticed this while using the Angular Material framework. You can see an example of this for yourself and log the events in the web inspector at https://material.angularjs.org/0.11.0/#/demo/material.components.button. Notice that clicking on any button with your finger will only fire the touchstart, touchend, mouseout and mousedown events (in that order.) This causes unwanted behaviour and seems to block the click event until you 're-click' the button.
Using the trackpad on the BlackBerry Classic and clicking on a button does trigger the proper events (mousedown, touchstart, mouseup, touchend in that order.)
I reduced this to a small test (http://codepen.io/mckenzielong/pen/MayWwy for running example):
<body>
<button id="test-button">Block mousedown</button>
<div></div>
</body>
var testButton = document.getElementById("test-button");
testButton.addEventListener("mousedown", function () {
console.log("Mousedown fired");
setTimeout(function () {
console.log("async timeout complete.");
}, 1000);
var node = document.createElement("p");
var textnode = document.createTextNode("Water");
node.appendChild(textnode)
document.getElementsByTagName("div")[0].appendChild(node);
}, false)
testButton.addEventListener("click", function () {
console.log("Click fired.");
}, false)
testButton.addEventListener("mouseup", function () {
console.log("Mouseup fired.");
}, false)
Expected behaviour: click the button, click fired and mouse up fired messages should be printed to the console.
Current behaviour: click and mouseup fire every second button click.
In the method sendAlert() I think the header is wrong:
HttpWReq.Headers.Add("ContentType", "text/plain");
I think it should be
HttpWReq.Headers.Add("Content-Type", "text/plain");
I get an error on my bb device when receiving a push message:
Missing Content-type header for push
EDIT. I receive an error after changing ContentType to Content-Type:
Error: System.ArgumentException: The 'Content-Type' header must be modified using the appropriate property or method.
Parameter name: name
at System.Net.WebHeaderCollection.ThrowOnRestrictedHeader(String headerName)
at System.Net.WebHeaderCollection.Add(String name, String value)
There is either a bug or a lot of unnecessary code in the 10.2.1 Client headless service -
The channel is not being created due to line 52 (service.cpp).
m_shouldChannelBeCreated = false;
This means that the pushService is not being registered on line 179.
Either line 52 should be set to true, OR the functions createChannelCompleted and createSessionCompleted are redundant and can be completely removed. I suspect line 52 should be set to true.
Also, following the instructions to import the app and compile it does not lead to a .bar files being created. It creates .so files.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.