Skip to content
This repository has been archived by the owner on Dec 13, 2021. It is now read-only.

Use sessionsStorage for copied content #52

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

dnwhte
Copy link

@dnwhte dnwhte commented Mar 18, 2019

No description provided.

Copy link

@mattbrailsford mattbrailsford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good but a couple of extra things are needed:

  1. If we aren't using localStorageService then there is no need for it to be injected as a dependency.
  2. Need to update the canCopyContent / canPasteContent methods to check session storage is available rather than the local storage service (I dunno if it's possible that local storage is supported but session storage isn't, but either way, it should probably consistant)

I'm not as precious about the following idea, but thought it worth sharing (@leekelleher maybe you have some thoughts):

I wonder if creating our own storageService might be a more robust approach here. Internally this could use the umbraco localStorageService and check to see if sessionStorage is supported. If not, use our own implementation, but if it is, then use cores. This way it's kinda self upgrading and keeps all the storage code in a single location.

@leekelleher leekelleher self-requested a review March 18, 2019 16:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

3 participants