OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
657 stars 93 forks source link

issue with context.document.getSelection(); in Word office.js #3692

Open shermaro91 opened 9 months ago

shermaro91 commented 9 months ago

Hello Team, Firstly, Thanks for your quick responses and instant fixes, That give us strength to provide something new to Add-in community. To continue this thing, I am adding one more thing in your bucket list.

So We have requirement where user is selecting multiple values of table (which has content control assigned) and we want to Identify how many values (which has content control assigned) are selected by user programmatically.

For that We are using "context.document.getSelection()" method of office.js.

But using this we are only getting last selected value's content control. So, We want to get all values content control here.

My Environment Platform : PC desktop Host: Word Office version number: Microsoft® Word for Microsoft 365 MSO (Version 2307 Build 16.0.16327.20200) 64-bit Operating System: Windows 10 pro

Expected behavior Should get all selected values content control detail

Current behavior

Getting only last selected values detail.

Steps to reproduce

  1. create in table in word. Assign content controls to any value of table based on your choice.
  2. Now select some values from table which has content control assigned.( For ex. total values are 10 out of which we are selected 5)
  3. Use context.document.getSelection(); to get all selected values.

Context

ElizabethSamuel-MSFT commented 9 months ago

@shermaro91 Thanks for asking about this.

@wangyun-microsoft Can you take a look?

Thanks.

Searion commented 9 months ago

Thanks for reporting this issue regarding getSelection(). This is a known issue and it has been put on our backlog.

shermaro91 commented 9 months ago

Thanks for quick reply @Searion . Do we have an estimated timeframe for when this issue will be resolved?

ZYUN-MSFT commented 9 months ago

Hi @shermaro91 ,

The backlog issues currently don't have the ETA for fix. We'll fix the exists issues with development scedule.

If this issue block your business scenario, please provided with your business impact (number of user affects) and your addin's name. That would be helpful for re-priority the issue.

Thanks.

shermaro91 commented 9 months ago

Hello @ZYUN-MSFT, The current issue is impacting all users and is a critical component for reviewing all table values in the IRIS CARBON Hive 2.0 add-in.

Thank you.

shermaro91 commented 8 months ago

Hi @ZYUN-MSFT Any update on this???

ZYUN-MSFT commented 8 months ago

@Searion @jipyua

Since the customer provided with their business impact, please update some information about this issue.

Thanks.

shermaro91 commented 8 months ago

Hi @Searion @jipyua Any update on this?

shermaro91 commented 8 months ago

Hi @Searion any updates?

Searion commented 8 months ago

@shermaro91 Currently the feature getting multiple selections in table is not a part of getSelection(). Could you please add your request on our [Microsoft 365 Developer Platform Ideas Forum] (https://aka.ms/m365dev-suggestions)? And we will consider it when we go through our plan process.

shqyking commented 7 months ago

I experienced same problem on Version 2308 Build 16.0.16731.20052. I found this issue was reported 3 years ago and was later claimed to be fixed on version 13523.10000. Issue link. I suppose at that time it was considered as a bug instead of feature gap. Is this a regression?