(browser) focus hocus pocus broke us

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

(browser) focus hocus pocus broke us

Bob Sneidar via use-livecode
How do we take focus away from the browser widget?

I am loading PDF's into the browser widget.  At that point, all key presses
get eaten up by the widget (e.g. arrows make the widget scroll), even if a
field has the insertion point.
Scripting the widget to intercept those events doesn't work.
"focus on nothing" doesn't take the focus away.
"click at the loc of" doesn't do it.
the browser document load events don't seem to fire for PDF's

Sugestions, please.
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: (browser) focus hocus pocus broke us

Bob Sneidar via use-livecode
One additional note, Panos suggested that browserDocumentLoadFailed might
be firing.
Surprise it is, but the error is
"plug-in handled load"
but firing a "focus on nothing" inside that event doesn't help, either.


On Sun, Sep 23, 2018 at 7:31 AM Mike Kerner <[hidden email]>
wrote:

> How do we take focus away from the browser widget?
>
> I am loading PDF's into the browser widget.  At that point, all key
> presses get eaten up by the widget (e.g. arrows make the widget scroll),
> even if a field has the insertion point.
> Scripting the widget to intercept those events doesn't work.
> "focus on nothing" doesn't take the focus away.
> "click at the loc of" doesn't do it.
> the browser document load events don't seem to fire for PDF's
>
> Sugestions, please.
>


--
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: (browser) focus hocus pocus broke us

Bob Sneidar via use-livecode
might be dumb....but what if istead of focus on nothing you focused on
another control that passes the rawkey?

On Sun, Sep 23, 2018 at 9:15 AM Mike Kerner via use-livecode <
[hidden email]> wrote:

> One additional note, Panos suggested that browserDocumentLoadFailed might
> be firing.
> Surprise it is, but the error is
> "plug-in handled load"
> but firing a "focus on nothing" inside that event doesn't help, either.
>
>
> On Sun, Sep 23, 2018 at 7:31 AM Mike Kerner <[hidden email]>
> wrote:
>
> > How do we take focus away from the browser widget?
> >
> > I am loading PDF's into the browser widget.  At that point, all key
> > presses get eaten up by the widget (e.g. arrows make the widget scroll),
> > even if a field has the insertion point.
> > Scripting the widget to intercept those events doesn't work.
> > "focus on nothing" doesn't take the focus away.
> > "click at the loc of" doesn't do it.
> > the browser document load events don't seem to fire for PDF's
> >
> > Sugestions, please.
> >
>
>
> --
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>    and did a little diving.
> And God said, "This is good."
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: (browser) focus hocus pocus broke us

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode
> Mike K. wrote:
> How do we take focus away from the browser widget?

Did you already try

do "document.activeElement.blur()" in widget "browser" ?

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: (browser) focus hocus pocus broke us

Bob Sneidar via use-livecode
already tried focusing on another control, and, I have no idea what
document.activeElement.blur() is supposed to do, but that didn't fix it
either.
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: (browser) focus hocus pocus broke us

Bob Sneidar via use-livecode
Hi Mike

This is actually a problem for all widgets with native layers. There’s also the additional complexity with the browser widget that some pages when you open them they have javascript that focuses in on something.

I have a PR that makes `the focusedObject` and `focus on nothing | object` work for all platforms but Linux.  I got completely stuck trying to come up with a solution for Linux to the point where I’m living in hope that someone answers this question on stackoverflow https://stackoverflow.com/questions/50092874/how-to-detect-focus-on-gtksocket <https://stackoverflow.com/questions/50092874/how-to-detect-focus-on-gtksocket>

So the PR is in limbo unfortunately…

Cheers

Monte

> On 24 Sep 2018, at 12:42 pm, Mike Kerner via use-livecode <[hidden email]> wrote:
>
> already tried focusing on another control, and, I have no idea what
> document.activeElement.blur() is supposed to do, but that didn't fix it
> either.
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: (browser) focus hocus pocus broke us

Bob Sneidar via use-livecode
Just a hunch .... maybe you can quickly toggle visibility of the
widget..after everything is loaded.  maybe that will be enough to lose
focus and not have to regain it?.... unlikely to work, but worth a try.



On Sun, Sep 23, 2018 at 11:15 PM Monte Goulding via use-livecode <
[hidden email]> wrote:

> Hi Mike
>
> This is actually a problem for all widgets with native layers. There’s
> also the additional complexity with the browser widget that some pages when
> you open them they have javascript that focuses in on something.
>
> I have a PR that makes `the focusedObject` and `focus on nothing | object`
> work for all platforms but Linux.  I got completely stuck trying to come up
> with a solution for Linux to the point where I’m living in hope that
> someone answers this question on stackoverflow
> https://stackoverflow.com/questions/50092874/how-to-detect-focus-on-gtksocket
> <
> https://stackoverflow.com/questions/50092874/how-to-detect-focus-on-gtksocket
> >
>
> So the PR is in limbo unfortunately…
>
> Cheers
>
> Monte
>
> > On 24 Sep 2018, at 12:42 pm, Mike Kerner via use-livecode <
> [hidden email]> wrote:
> >
> > already tried focusing on another control, and, I have no idea what
> > document.activeElement.blur() is supposed to do, but that didn't fix it
> > either.
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: (browser) focus hocus pocus broke us

Bob Sneidar via use-livecode
Thanks Monte.  Fix it anyway.
Thanks for the idea, Tom, no joy.


On Sun, Sep 23, 2018 at 11:26 PM Tom Glod via use-livecode <
[hidden email]> wrote:

> Just a hunch .... maybe you can quickly toggle visibility of the
> widget..after everything is loaded.  maybe that will be enough to lose
> focus and not have to regain it?.... unlikely to work, but worth a try.
>
>
>
> On Sun, Sep 23, 2018 at 11:15 PM Monte Goulding via use-livecode <
> [hidden email]> wrote:
>
> > Hi Mike
> >
> > This is actually a problem for all widgets with native layers. There’s
> > also the additional complexity with the browser widget that some pages
> when
> > you open them they have javascript that focuses in on something.
> >
> > I have a PR that makes `the focusedObject` and `focus on nothing |
> object`
> > work for all platforms but Linux.  I got completely stuck trying to come
> up
> > with a solution for Linux to the point where I’m living in hope that
> > someone answers this question on stackoverflow
> >
> https://stackoverflow.com/questions/50092874/how-to-detect-focus-on-gtksocket
> > <
> >
> https://stackoverflow.com/questions/50092874/how-to-detect-focus-on-gtksocket
> > >
> >
> > So the PR is in limbo unfortunately…
> >
> > Cheers
> >
> > Monte
> >
> > > On 24 Sep 2018, at 12:42 pm, Mike Kerner via use-livecode <
> > [hidden email]> wrote:
> > >
> > > already tried focusing on another control, and, I have no idea what
> > > document.activeElement.blur() is supposed to do, but that didn't fix it
> > > either.
> > > _______________________________________________
> > > use-livecode mailing list
> > > [hidden email]
> > > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



--
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: (browser) focus hocus pocus broke us

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode
> Mike K. wrote:
> ... I have no idea what document.activeElement.blur() is supposed to do ...

The HTMLElement.blur() method removes keyboard focus from the current element.
Is Google or similar defunct with you?
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: (browser) focus hocus pocus broke us

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode
On 9/24/18 5:45 AM, Mike Kerner via use-livecode wrote:
> Thanks Monte.  Fix it anyway.
> Thanks for the idea, Tom, no joy.

Related use case: some web pages download a "ton" of javascript at start
up.

I can't find a way to set a "spinner/I-am-downloading" on the screen,
until we get some content appearing on the page.

BR


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: (browser) focus hocus pocus broke us

Bob Sneidar via use-livecode
On my silly phone now as in bed. Wonder if you couldn't use a splash screen
substack with a spinner? Will try this tomorrow, although am uncertain re
substacks in the HTML5 standalone.

On Mon, Sep 24, 2018, 11:44 PM Sannyasin Brahmanathaswami via use-livecode <
[hidden email]> wrote:

> On 9/24/18 5:45 AM, Mike Kerner via use-livecode wrote:
> > Thanks Monte.  Fix it anyway.
> > Thanks for the idea, Tom, no joy.
>
> Related use case: some web pages download a "ton" of javascript at start
> up.
>
> I can't find a way to set a "spinner/I-am-downloading" on the screen,
> until we get some content appearing on the page.
>
> BR
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: (browser) focus hocus pocus broke us

Bob Sneidar via use-livecode
Unless something changed, the built in spinner uses the single threaded engine, so any processing done by the engine will halt the spinner, thereby making the spinner just the other side of worthless for anything but non-blocking operations.

What I did was I wrote a standalone that could receive messages (I used AppletaLk, but you could also use sockets) and then launched the app when the splash screen launched. I then sent text messages that would be displayed in a text field, and there was a spinner that ran. I also send show/hide messages to show and hide the window, so it looked like a progress dialog to the end user. I think I made the stack style System so it floated above everything else.

I never got around to preventing the app from having an icon in the OS X dock though. There are ways to do that. Same with Windows.

Bob S


> On Sep 24, 2018, at 13:48 , Richmond Mathewson via use-livecode <[hidden email]> wrote:
>
> On my silly phone now as in bed. Wonder if you couldn't use a splash screen
> substack with a spinner? Will try this tomorrow, although am uncertain re
> substacks in the HTML5 standalone.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: (browser) focus hocus pocus broke us

Bob Sneidar via use-livecode
Correction: I set the systemWindow property to true.

Bob S


> On Sep 24, 2018, at 14:25 , Bob Sneidar via use-livecode <[hidden email]> wrote:
>
> Unless something changed, the built in spinner uses the single threaded engine, so any processing done by the engine will halt the spinner, thereby making the spinner just the other side of worthless for anything but non-blocking operations.
>
> What I did was I wrote a standalone that could receive messages (I used AppletaLk, but you could also use sockets) and then launched the app when the splash screen launched. I then sent text messages that would be displayed in a text field, and there was a spinner that ran. I also send show/hide messages to show and hide the window, so it looked like a progress dialog to the end user. I think I made the stack style System so it floated above everything else.
>
> I never got around to preventing the app from having an icon in the OS X dock though. There are ways to do that. Same with Windows.
>
> Bob S
>
>
>> On Sep 24, 2018, at 13:48 , Richmond Mathewson via use-livecode <[hidden email]> wrote:
>>
>> On my silly phone now as in bed. Wonder if you couldn't use a splash screen
>> substack with a spinner? Will try this tomorrow, although am uncertain re
>> substacks in the HTML5 standalone.
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: (browser) focus hocus pocus broke us

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode
> BR wrote:
> Related use case: some web pages download a "ton" of
> javascript at start up.
> I can't find a way to set a "spinner/I-am-downloading"
> on the screen, until we get some content appearing on
> the page.

For your own pages you could use pace
http://github.hubspot.com/pace/docs/welcome/

See for example one of my HTML5 standalones:
http://hyperhh.de/html5/SVG2PNG_HTML5-9.0.0-dp-4hhX.html


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: (browser) focus hocus pocus broke us

Bob Sneidar via use-livecode
I'm loading a pdf, not a web page into the widget.
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: (browser) focus hocus pocus broke us

Bob Sneidar via use-livecode
Mikey you have the Business Edition don't you? I was wondering if XPDF
could be useful in your use case.

Best,
Panos
--

On Tue, Sep 25, 2018 at 3:44 AM Mike Kerner via use-livecode <
[hidden email]> wrote:

> I'm loading a pdf, not a web page into the widget.
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: (browser) focus hocus pocus broke us

Bob Sneidar via use-livecode
We do have a business license, and I have no idea what xpdf is, so now I'm
going to do some research.

On Tue, Sep 25, 2018 at 6:52 AM panagiotis merakos via use-livecode <
[hidden email]> wrote:

> Mikey you have the Business Edition don't you? I was wondering if XPDF
> could be useful in your use case.
>
> Best,
> Panos
> --
>
> On Tue, Sep 25, 2018 at 3:44 AM Mike Kerner via use-livecode <
> [hidden email]> wrote:
>
> > I'm loading a pdf, not a web page into the widget.
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


--
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: (browser) focus hocus pocus broke us

Bob Sneidar via use-livecode
ooooh, so far so good.
It's really embarrassing that I didn't remember xpdf.  At all.  Especially
since Paul did a video about it at LCG THIS YEAR.  Watching it again now.
Thanks PM!

On Tue, Sep 25, 2018 at 9:07 AM Mike Kerner <[hidden email]>
wrote:

> We do have a business license, and I have no idea what xpdf is, so now I'm
> going to do some research.
>
> On Tue, Sep 25, 2018 at 6:52 AM panagiotis merakos via use-livecode <
> [hidden email]> wrote:
>
>> Mikey you have the Business Edition don't you? I was wondering if XPDF
>> could be useful in your use case.
>>
>> Best,
>> Panos
>> --
>>
>> On Tue, Sep 25, 2018 at 3:44 AM Mike Kerner via use-livecode <
>> [hidden email]> wrote:
>>
>> > I'm loading a pdf, not a web page into the widget.
>> > _______________________________________________
>> > use-livecode mailing list
>> > [hidden email]
>> > Please visit this url to subscribe, unsubscribe and manage your
>> > subscription preferences:
>> > http://lists.runrev.com/mailman/listinfo/use-livecode
>> >
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
> --
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>    and did a little diving.
> And God said, "This is good."
>


--
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: (browser) focus hocus pocus broke us

Bob Sneidar via use-livecode
FYI, Paul's final example, which is like an LC version of acrobat reader,
now has its own repo (https://github.com/macmikey/xpdf)

On Tue, Sep 25, 2018 at 10:58 AM Mike Kerner <[hidden email]>
wrote:

> ooooh, so far so good.
> It's really embarrassing that I didn't remember xpdf.  At all.  Especially
> since Paul did a video about it at LCG THIS YEAR.  Watching it again now.
> Thanks PM!
>
> On Tue, Sep 25, 2018 at 9:07 AM Mike Kerner <[hidden email]>
> wrote:
>
>> We do have a business license, and I have no idea what xpdf is, so now
>> I'm going to do some research.
>>
>> On Tue, Sep 25, 2018 at 6:52 AM panagiotis merakos via use-livecode <
>> [hidden email]> wrote:
>>
>>> Mikey you have the Business Edition don't you? I was wondering if XPDF
>>> could be useful in your use case.
>>>
>>> Best,
>>> Panos
>>> --
>>>
>>> On Tue, Sep 25, 2018 at 3:44 AM Mike Kerner via use-livecode <
>>> [hidden email]> wrote:
>>>
>>> > I'm loading a pdf, not a web page into the widget.
>>> > _______________________________________________
>>> > use-livecode mailing list
>>> > [hidden email]
>>> > Please visit this url to subscribe, unsubscribe and manage your
>>> > subscription preferences:
>>> > http://lists.runrev.com/mailman/listinfo/use-livecode
>>> >
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>
>>
>> --
>> On the first day, God created the heavens and the Earth
>> On the second day, God created the oceans.
>> On the third day, God put the animals on hold for a few hours,
>>    and did a little diving.
>> And God said, "This is good."
>>
>
>
> --
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>    and did a little diving.
> And God said, "This is good."
>


--
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode