Closed GoogleCodeExporter closed 8 years ago
Hey duopixel,
thanks! But I'm pretty sure that is not a patch. That's a whole file! Check
other issues for example patches.
Original comment by asyazwan
on 5 Mar 2012 at 7:51
Sorry, this is the first time I submit a patch. Is this one right?
Original comment by duopi...@gmail.com
on 5 Mar 2012 at 2:49
Attachments:
Yes, that seems more like a patch.
Easiest to generate should be by going into your svg-edit svn directory and
modify your file, then do:
svn diff
or output to file:
svn diff > 919.patch
done!
---
Raising the priority as this seems pretty important for macs with no option but
to Cmd+Click.
Original comment by asyazwan
on 5 Mar 2012 at 4:26
Btw, two-fingers on the trackpad and then clicking is my standard way of
"right-clicking" on a Mac and this brings up the context menu. Nonetheless, I
will look at this patch today, thanks!
Original comment by codedr...@gmail.com
on 17 Mar 2012 at 4:08
Thanks a lot for this patch! Merged in r2060. :)
Next time, please use "svn diff" to create your patch. I had to manually patch
this file because it said "missing header for unified diff at line 2 of patch".
I've also left a message at the original developer's site to let them know we
have modified their extension in case they want to pick up our changes.
Original comment by codedr...@gmail.com
on 17 Mar 2012 at 5:45
Thanks! This is the first time I submit a patch anywhere, I'll make sure to use
the built in tools next time. Also: great tip on the double finger click, all
these years wasted reaching for the control key...
Original comment by duopi...@gmail.com
on 17 Mar 2012 at 5:53
I'm pretty sure this patch introduced a new bug.
Try right-clicking twice and left-clicking. Context menu will popup. It seems
any right-clicking more than once will do this.
Not really a blocker, but I just tested with a pre-patch version and it's ok.
Do you mind looking into it, duopixel?
Original comment by asyazwan
on 19 Mar 2012 at 6:25
I'm not able to replicate, can you let me know your browser/os?
Original comment by duopi...@gmail.com
on 19 Mar 2012 at 7:06
FF 11 / Chrome 17 on Windows 7 x64.
On FF, it only takes 1 right-click to reproduce.
Original comment by asyazwan
on 19 Mar 2012 at 11:58
It's binded to two different events, so the code is executed twice, but I don't
know why this is only evident on Windows.
I had to rework the code so it uses the real contextmenu event, since Opera
doesn't pass the mouseup event if the event originated from contextmenu.
I don't have a windows machine to test this, mind giving it a try?
Original comment by duopi...@gmail.com
on 19 Mar 2012 at 4:06
Attachments:
Hi,
Good news is it works as expected on Chrome.
Bad news is it now requires 2 right clicks to open the menu on FF 11.
Original comment by asyazwan
on 20 Mar 2012 at 12:48
I have a question though. Why is it necessary to bind everytime any click
occurs? Doesn't that seems inefficient? Wouldn't checking if event is bound
first be better?
Original comment by asyazwan
on 20 Mar 2012 at 12:51
It's not binded on click as far as I can tell. It does execute on every click
done on the workspace and layers area.
I think this problem is beyond my abilities, I'm submitting a final patch that
does ugly browser sniffing to bring up the context menu if control + click &&
isMac, but feel free to revert to the original version is you think it's too
hacky.
Original comment by duopi...@gmail.com
on 20 Mar 2012 at 4:34
Attachments:
Yeah I think it is best to introduce a hack just for Mac, rather than risking
malfunction in all other browsers/platform.
FYI we have browser utility functions under namespace svgedit.browser.
Are you up for adding isMac in browser.js and use it in your patch?
On a related note, from quickly going through the function I found out that
contextmenu event is bound twice. Could this be the root? You can check with
$('#workarea').data('events') on your console right after loading.
Original comment by asyazwan
on 20 Mar 2012 at 6:26
Here is the patch with the added isMac method to svgedit.browser and the fix
for ctrl + click.
If the second contextmenu binding showed up in my previous patch, in my working
copy I merged the events and it was still misbehaving.
Original comment by duopi...@gmail.com
on 20 Mar 2012 at 7:03
Attachments:
Alright, patch applied in r2065.
Thank you very much. :)
Original comment by asyazwan
on 20 Mar 2012 at 9:00
Original issue reported on code.google.com by
duopi...@gmail.com
on 5 Mar 2012 at 6:06Attachments: