A kind reminder we would like all registered users to weigh in on one of our forum's security policies.
Please take a moment to read this thread and place a vote.
https://forum.palemoon.org/viewtopic.php?f=17&t=32935

Simulated click

Discussions about the development and maturation of the platform code (UXP).
Warning: may contain highly-technical topics.

Moderators: trava90, athenian200

Michaell
Lunatic
Lunatic
Posts: 393
Joined: 2018-05-26, 18:13

Simulated click

Post by Michaell » 2025-07-01, 13:58

This new simulated click behavior in 33.8 doesn't sound good to me. I assume that it's in javascript so it can't occur on sites where JS is blocked. But still I see nothing good about simulating human behavior when they try to make us prove we're human. Other than blocking all JS, I'll be looking for a way to block this simulated click behavior.
Win10home(1709), PM33.9.0.1-portable as of Sep. 24, 2025

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 38533
Joined: 2011-08-28, 17:27
Location: Sweden

Re: Simulated click

Post by Moonchild » 2025-07-01, 14:27

Simulated clicks have been a thing for many years. I did complain about this way back when (since it reintroduced drive-by downloading from scripts) but it was never acted upon, because websites relied on this all over the place (e.g. for metrics).
Our behaviour hasn't changed regarding whether it is allowed or not; what has changed is how it can specifically be called from scripting without first attaching the created element to the document. See recent discussions on the forum about this.
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
_yup_
Moonbather
Moonbather
Posts: 63
Joined: 2025-04-26, 11:45

Re: Simulated click

Post by _yup_ » 2025-07-03, 10:00

Moonchild wrote:
2025-07-01, 14:27
Our behaviour hasn't changed regarding whether it is allowed or not; what has changed is how it can specifically be called from scripting without first attaching the created element to the document. See recent discussions on the forum about this.
Can you point me to some of them?

Recently I found something unusual (and unexpected) with programmatically added window elements, that I interpreted as a possible bug in the UXP. But, perhaps, it is imposed by the above mentioned restrictions.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 38533
Joined: 2011-08-28, 17:27
Location: Sweden

Re: Simulated click

Post by Moonchild » 2025-07-03, 11:14

I guess the most pertinent with the most discussion/explanation is this one:
viewtopic.php?f=70&t=32222
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
_yup_
Moonbather
Moonbather
Posts: 63
Joined: 2025-04-26, 11:45

Re: Simulated click

Post by _yup_ » 2025-07-03, 14:56

My situation is worse. The same element either works, or does not work depending on the sequence of operations:

Code: Select all

1. Add element to DOM.
2. Set element's properties.
or

Code: Select all

1. Set element's properties.
2. Add element to DOM.
And there is yet one possible participant of the mystery - step 0:

Code: Select all

0. Create element.
- when I encountered the problem, I was using a rare function to do that.

Soon I will finish a small job, devote some time to detailed investigation, and then create a testcase for you.