Did you open this in the JavaScript debugger and looked at the JS console
while doing that?
On Tuesday, October 27, 2020 at 12:15:15 PM UTC+2 P5music wrote:
> It is not a regression, I created a test case with a similar layout and it
> worked with a Google page.
>
> I debugged my app and it turned up being Javascript injections' fault.
> But it is very strange:
>
> The initial page of the BC is made by:
>
> webView.setPage("<HTML><BODY style=\"display:flex;flex-direction:column;\"
> >"+
> createLines()+
> "</BODY></HTML>","");
>
> where it is
> private String createLines()
> {
> String result="";
> for (int i=0;i<100;i++)
> result=result+"<BR/><P>TEXT - LINE "+i+"</P>";
> return result;
> }
>
> It is just to have a long page. At this stage the scrollbar and the mouse
> wheel work, and the page is scrollable.
>
> Then a list of commands like
> var div=document.createElement('DIV');div.style.position="relative";div.id
> ="1";document.body.appendChild(div);
>
> are injected, in a single string.
> As I can see the BC does not like that commands, even just one of them (I
> tried just one of them too).
>
> The divs are correctly displayed, also with real content inside them, but
> the issue is present even with this bare empty div HTML.
>
> When that command is injected the BC is no more responsive to mouse events.
>
> This method is used:
> public void executeJS(String command)
> {
> webView.execute(command);
> }
>
> What's wrong with that Javascript injection?
>
> Il giorno martedì 27 ottobre 2020 alle 03:55:28 UTC+1 Shai Almog ha
> scritto:
>
>> In that case it could be a CEF regression. Can you isolate a runnable
>> test case that reproduces the problem and file an issue?
>>
>> On Monday, October 26, 2020 at 1:10:53 PM UTC+2 P5music wrote:
>>
>>> I cannot test on the FX version, I am testing the CEF one on the
>>> Simulator (no device test available too).
>>>
>>> Yes I see the vertical scrollbar of the BrowserComponent, and it stays
>>> also with
>>> setScrollVisible(false);
>>> But the BC does not scroll with that, and it does not scroll even using
>>> the mouse wheel, or dragging over with the mouse.
>>>
>>> Il giorno lunedì 26 ottobre 2020 alle 04:44:34 UTC+1 Shai Almog ha
>>> scritto:
>>>
>>>> Do you see a scroll bar on the browser component?
>>>> Did you try this on the device? Did you try it with the FX version of
>>>> the browser component?
>>>>
>>>> On Sunday, October 25, 2020 at 12:28:46 PM UTC+2 P5music wrote:
>>>>
>>>>> So I removed all useless calls to setScrollable kind of methods.
>>>>> It is called just on the mainForm and/or its content pane.
>>>>> mainForm.setScrollable(false);
>>>>> OR
>>>>> mainForm.getContentPane().setScrollableY(false);
>>>>> is needed to let not scroll the entire user interface.
>>>>>
>>>>> But the BC is not scrollable.
>>>>> If I set scrollableY=true for the left container it does not scroll
>>>>> either.
>>>>> One of the BC or the left container has to be scrollable to fulfill my
>>>>> needs.
>>>>>
>>>>> What further checks can be done?
>>>>> Thanks
>>>>> Il giorno domenica 25 ottobre 2020 alle 03:14:39 UTC+1 Shai Almog ha
>>>>> scritto:
>>>>>
>>>>>> Don't change the scrollability of the browser component.
>>>>>>
>>>>>> That option is under zoom and it relates to the scrolling of the
>>>>>> simulator skin itself.
>>>>>>
>>>>>> You don't need to explicitly call setScrollable(false) since that's
>>>>>> the default. The only thing that's scrollable by default if the content
>>>>>> pane of the main form.
>>>>>>
>>>>>> On Saturday, October 24, 2020 at 2:09:05 PM UTC+3 P5music wrote:
>>>>>>
>>>>>>> The CEF BC is used.
>>>>>>> for the mainform: setScrollable(false)
>>>>>>> for the BC: setScrollableY(true)
>>>>>>>
>>>>>>> There is no simulator menu entry "scrollable" to uncheck, and I do
>>>>>>> not understand why to uncheck it anyway, and what it would refer to?
>>>>>>> Please can you explain?
>>>>>>>
>>>>>>> I have nested containers and I set them all with
>>>>>>> setScrollableX(false) and setScrollableY(false).
>>>>>>> Also the result container of fab binding is set the same. (this
>>>>>>> result container is added to the form)
>>>>>>>
>>>>>>> A thing has be noticed.
>>>>>>> The most deep nested level is a BorderLayout. It has in the north a
>>>>>>> vertically-short container, then in the center it has the
>>>>>>> BrowserComponent.
>>>>>>> When attempting to scroll the BC, just sometimes I see a very tiny
>>>>>>> movement of the entire BC including the vertical scrollbar, but not the
>>>>>>> other container in north position.
>>>>>>> This reminds me that something is scrolling that's surrounding the
>>>>>>> BC but I cannot understand what.
>>>>>>> Do you see anything about this?
>>>>>>>
>>>>>>> Il giorno sabato 24 ottobre 2020 alle 07:32:54 UTC+2 Shai Almog ha
>>>>>>> scritto:
>>>>>>>
>>>>>>>> How is it set to scrollable?
>>>>>>>> If you mean in the simulator menu try to uncheck scrollable.
>>>>>>>>
>>>>>>>> Are you using CEF or the FX based browser?
>>>>>>>>
>>>>>>>> On Friday, October 23, 2020 at 5:41:50 PM UTC+3 P5music wrote:
>>>>>>>>
>>>>>>>>> My CodenameApp has a main form that splits the screen like a
>>>>>>>>> master detail layout in landscape mode. It is set not scrollable.
>>>>>>>>> A table layout is used with some constraints to have this
>>>>>>>>> appearance.
>>>>>>>>> I am testint the app in the simulator.
>>>>>>>>> In the left part a BrowserComponent is inside a container and
>>>>>>>>> displays some HTML code.
>>>>>>>>> I see that the vertical bar appears on the BC because the HTML
>>>>>>>>> overflows vertically, but cannot be moved, it is blocked.
>>>>>>>>> The BC is not resposive to the mouse wheel too. It is set
>>>>>>>>> scrollable.
>>>>>>>>>
>>>>>>>>> The container is bound to the FloatingActionButton that is
>>>>>>>>> floating on the container itself and the BC.
>>>>>>>>>
>>>>>>>>> Do you know any issue that prevents the BC from being scrolled? Is
>>>>>>>>> it something related to the Version 7.0 milestone issues?
>>>>>>>>> Thanks in advance
>>>>>>>>>
>>>>>>>>>
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/e03a9050-8dbe-4c56-9909-97d347e74d32n%40googlegroups.com.