NW.js Is Vulnerable (Developer Tools Can Be Accessed!)

Bugs will be moved here once resolved.

Post » Wed Oct 26, 2016 1:13 pm

TheRealDannyyy wrote:
Danwood wrote:This one works as intended, it disables the scroll icon, but retains the ability to interact with MMB
document.body.onmousedown = function(e) { if (e.button === 1) return false; }

He's on it, might take a little while seems to be busy at the moment.
By the way, what about the previous one with the rightclick context menu, do right click actions work as intended?


They do ;)

The new code works fine for MMB, i just need to assign a form ID to buttons as well (unless there is another "body" for them too)
B
66
S
22
G
4
Posts: 360
Reputation: 6,584

Post » Wed Oct 26, 2016 1:21 pm

Danwood wrote:The new code works fine for MMB, i just need to assign a form ID to buttons as well (unless there is another "body" for them too)

Could you precisely explain your problem based on "what you want to achieve" and "what the problems are", sorry but I'm a little confused right now.
ImageImageImage
B
64
S
24
G
78
Posts: 666
Reputation: 45,070

Post » Wed Oct 26, 2016 1:25 pm

TheRealDannyyy wrote:Could you precisely explain your problem based on "what you want to achieve" and "what the problems are", sorry but I'm a little confused right now.


The previous problem was the scrolling icon appearing when clicking middle mouse.

The code you gave me disabled completely middle mouse interactions, so it solved the problem but prevented the game from using the MMB.

So i found a new code that works just fine (disables the scrolling icon, but allows to use MMB on objects).

this one: "document.body.onmousedown = function(e) { if (e.button === 1) return false; }"

Now, the only issue is not really a big deal, i just need to know if there is a "global" form/ID for button objects as well (like "body" for other objects), so i dont need to assign a formID to all the 100+ buttons in my projects :mrgreen:
B
66
S
22
G
4
Posts: 360
Reputation: 6,584

Post » Wed Oct 26, 2016 1:27 pm

Danwood wrote:Now, the only issue is not really a big deal, i just need to know if there is a "global" form/ID for button objects as well (like "body" for other objects", so i dont need to assign a formID to all the 100+ buttons in my projects

Armaldio gave me this code, try this one out please:
Code: Select all
"$(function(){$(document.body).mousedown(function(e){if(e.button==1)return false});});"


EDIT:
In the worst case you could create families for the form elements and assign them an ID.
ImageImageImage
B
64
S
24
G
78
Posts: 666
Reputation: 45,070

Post » Wed Oct 26, 2016 1:30 pm

TheRealDannyyy wrote:
Danwood wrote:Now, the only issue is not really a big deal, i just need to know if there is a "global" form/ID for button objects as well (like "body" for other objects", so i dont need to assign a formID to all the 100+ buttons in my projects

Armaldio gave me this code, try this one out please:
Code: Select all
"$(function(){$(document.body).mousedown(function(e){if(e.button==1)return false});});"


EDIT:
In the worst case you could create families for the form elements and assign them an ID.



The code is just like the one i found, works fine for "body". So i can assign form ID to whole button family? Because i can't find the form proprieties of the button family in the editor
B
66
S
22
G
4
Posts: 360
Reputation: 6,584

Post » Wed Oct 26, 2016 1:41 pm

Danwood wrote:The code is just like the one i found, works fine for "body". So i can assign form ID to whole button family? Because i can't find the form proprieties of the button family in the editor

Yep not like I though it would be, damn C2 family system thought it would make this a little easier.
Anyway for now I have nothing else to offer, I might come back later so either wait or let the annoying, repetitive work begin. :P

To be honest, it's kinda weird that NWjs is showing that thing on your end.
When I middle click (not inside forms) there is nothing appearing, might want to disable "unbounded scrolling" in the layout properties.
Unless you plan to create some sort of website using C2, then you should leave it on.
ImageImageImage
B
64
S
24
G
78
Posts: 666
Reputation: 45,070

Post » Wed Oct 26, 2016 1:46 pm

@TheRealDannyyy
No worries, you actually helped me fix the issue, what's left is a minor thing, the main problem is gone! Thanks!
B
66
S
22
G
4
Posts: 360
Reputation: 6,584

Post » Wed Oct 26, 2016 2:29 pm

Danwood wrote:@TheRealDannyyy
No worries, you actually helped me fix the issue, what's left is a minor thing, the main problem is gone! Thanks!

No probs we're all on the same messy but useful, web-based boat. :roll:

May I plug you our Official C2 Discord Server,
with a fairly large amount of active users and quick help with any kind of C2 related problems.

Image
ImageImageImage
B
64
S
24
G
78
Posts: 666
Reputation: 45,070

Post » Wed Oct 26, 2016 2:55 pm

TheRealDannyyy wrote:May I plug you our Official C2 Discord Server,
with a fairly large amount of active users and quick help with any kind of C2 related problems.


I will ;)
B
66
S
22
G
4
Posts: 360
Reputation: 6,584

Previous

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 5 guests