You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a test case. (You find the relevant code below)
The test app features a CEF BrowserComponent with some text inside.
Text lines are not so long horizontally to fill the view, so the right part is empty.
Also the bottom part is empty because only a few text lines are in the HTML.
On the Android device:
I can click on text and I have the mousedown/mouseup sequence (events are fired and callbacks are issued) (-> OK).
I can click on the empty part on the right and I have the mousedown/mouseup sequence (events are fired and callbacks are issued) (-> OK).
If I click on the empty part on the bottom I have no callbacks (-> OK).
If I long-press on the text the Android text-selection interface appears (-> OK).
If I long-press on the empty part on the right no callbacks are issued (this is the problem this thread is about, and also see below) (-> not OK) .
I remind that the empty part on the right is a DIV with the callbacks on it.
And the bottom part is really empty.
So, for my app to work
-the long-press events should be issued also on the text, if present in the iFrames
because in my app the iFrames have this attribute setting:
iframe.style.pointerEvents="none";.
In the simulator mouse events for long-press are correctly fired
but
in the Android device the text-selection interface appears also when the iFrame has the above mentioned attribute (-> not OK).
So this is another facet of the issue, I think it is the same issue, but it is not in the test case I sent the build.
It easy to reproduce setting a suitable attribute in HTML elements, you should see that the text is selectable (not ok).
Regards
`public void start() {
if(current != null){
current.show();
return;
}
Form hi = new Form("Hi World");
hi.setLayout(new BorderLayout());
hi.add(BorderLayout.NORTH,new Label("Hi World"));
BrowserComponent bc=new BrowserComponent();
bc.addWebEventListener("onLoad", new ActionListener() { @OverRide
public void actionPerformed(ActionEvent evt) {
System.out.println("onload");
bc.addJSCallback("var div=document.getElementById('divId');" +
"callMouseDown =function(){callback.onSuccess('mousedown');};callMouseUp =function(){callback.onSuccess('mouseup');};"+
"div.addEventListener('mousedown', function () {"+
"callMouseDown();"+
"});"+
"div.addEventListener('mouseup', function () {"+
"callMouseUp();"+
"});"
, new SuccessCallback<BrowserComponent.JSRef>() { @OverRide
public void onSucess(BrowserComponent.JSRef value) {
System.out.println("webview callback value="+value.getValue());
}});
}
});
//here there is HTML but it seems that it gets not displayed inside the "code" quotes
bc.setPage("
TEST TEST TEST TEST TEST TEST TEST
","");
hi.add(BorderLayout.CENTER,bc);
hi.show();
}`
The text was updated successfully, but these errors were encountered:
I created a test case. (You find the relevant code below)
The test app features a CEF BrowserComponent with some text inside.
Text lines are not so long horizontally to fill the view, so the right part is empty.
Also the bottom part is empty because only a few text lines are in the HTML.
On the Android device:
I can click on text and I have the mousedown/mouseup sequence (events are fired and callbacks are issued) (-> OK).
I can click on the empty part on the right and I have the mousedown/mouseup sequence (events are fired and callbacks are issued) (-> OK).
If I click on the empty part on the bottom I have no callbacks (-> OK).
If I long-press on the text the Android text-selection interface appears (-> OK).
If I long-press on the empty part on the right no callbacks are issued (this is the problem this thread is about, and also see below) (-> not OK) .
I remind that the empty part on the right is a DIV with the callbacks on it.
And the bottom part is really empty.
So, for my app to work
-the long-press events should be issued also on the text, if present in the iFrames
because in my app the iFrames have this attribute setting:
iframe.style.pointerEvents="none";.
In the simulator mouse events for long-press are correctly fired
but
in the Android device the text-selection interface appears also when the iFrame has the above mentioned attribute (-> not OK).
So this is another facet of the issue, I think it is the same issue, but it is not in the test case I sent the build.
It easy to reproduce setting a suitable attribute in HTML elements, you should see that the text is selectable (not ok).
Regards
`public void start() {
if(current != null){
current.show();
return;
}
Form hi = new Form("Hi World");
hi.setLayout(new BorderLayout());
hi.add(BorderLayout.NORTH,new Label("Hi World"));
BrowserComponent bc=new BrowserComponent();
bc.addWebEventListener("onLoad", new ActionListener() {
@OverRide
public void actionPerformed(ActionEvent evt) {
System.out.println("onload");
bc.addJSCallback("var div=document.getElementById('divId');" +
"callMouseDown =function(){callback.onSuccess('mousedown');};callMouseUp =function(){callback.onSuccess('mouseup');};"+
"div.addEventListener('mousedown', function () {"+
"callMouseDown();"+
"});"+
"div.addEventListener('mouseup', function () {"+
"callMouseUp();"+
"});"
, new SuccessCallback<BrowserComponent.JSRef>() {
@OverRide
public void onSucess(BrowserComponent.JSRef value) {
System.out.println("webview callback value="+value.getValue());
}});
}
});
//here there is HTML but it seems that it gets not displayed inside the "code" quotes
bc.setPage("
TEST
TEST
TEST
TEST
TEST
TEST
hi.add(BorderLayout.CENTER,bc);
hi.show();
}`
The text was updated successfully, but these errors were encountered: