adobe-photoshop / spaces-design

Adobe Photoshop Design Space
http://adobe-photoshop.github.io/
Other
852 stars 74 forks source link

Drag and drop a photo from browser causes an error #3635

Closed ktaki closed 8 years ago

ktaki commented 8 years ago

Action layers.addLayers failed: base element not found

Open Adobe Stock site in a browser. Drag and drop a photo onto a canvas.

screen shot 2016-01-28 at 2 03 32 pm

iwehrman commented 8 years ago

Probably happens for all images from browsers?

ktaki commented 8 years ago

Yes, that is the case. Dragging any image from browsers on to canvas does.

iwehrman commented 8 years ago

Hmm, I can't repro on Mac pgdev.1054 at 86ccaf629190b7baccbdaf1d663a22f9c55500a9. Did you observe this on Mac or Win?

ktaki commented 8 years ago

I tried with the Mac pgdev 1060 at 86ccaf6. It is and has been easy to repro for me. @chadrolfs Can you try it? Just drag any image from a browser to a canvas.

chadrolfs commented 8 years ago

yep, piece of :cake:, I can repro very easily

iwehrman commented 8 years ago

I still can't repro, I guess it's a timing issue. Maybe some other engineer can try to repro? @DivyaPrabhakar?

iwehrman commented 8 years ago

@volfied can you repro this?

baaygun commented 8 years ago

I can repro, given that base element is not found error is coming from PS, I'll take a look.

baaygun commented 8 years ago

Trick is to open a new document.

baaygun commented 8 years ago

I believe the problem is dragging an image to canvas acts as a paste operation, and we get the "drag" event before Photoshop had the time to update it's own document.

https://jira.corp.adobe.com/browse/PS-1370

iwehrman commented 8 years ago

Kicking this out of the milestone because we're blocked, but adding the Ship Blocker label.

iwehrman commented 8 years ago

Over to @ktaki to verify.

ktaki commented 8 years ago

No, it did not fix the issue. Do we want to double the delay? It seems to me, this will not result in any bad state afterwards. What would happen if we leave it as is?

iwehrman commented 8 years ago

Back to @shaoshing. Maybe the timeout wasn't long enough?

iwehrman commented 8 years ago

In theory the UI should reset itself after the unhandled error. I prefer not to rely on that though...

shaoshing commented 8 years ago

@iwehrman @ktaki It turns out that the error has nothing to do with time delay. I've explains the actual cause in my PR #3797, and it only happens when dropping image from browser to an empty artboard.

Here's how to reproduce the bug: 1 create a new document 2 drag any image from browser to the art board 3 error base element not found

Same operation works if the artboard is not empty: 1 create a new document 2 draw a rectangular on the artboard 3 drag any image from browser to the art board

iwehrman commented 8 years ago

OK, let's try it again! FBNC to @ktaki.

ktaki commented 8 years ago

Verified the fix.