patch 8.2.2470: popup_getoptions() does not get textprop from other tab

Problem:    Popup_getoptions() does not get textprop from other tab.
Solution:   use win_valid_any_tab(). (closes #7786)
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index 7335c1c..11b1c4a 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -3803,4 +3803,18 @@
   call feedkeys("\<c-n>\<c-n>\<c-p>\<cr>", 'xt')
 endfunc
 
+func Test_popup_getoptions_other_tab()
+  new
+  call setline(1, 'some text')
+  call prop_type_add('textprop', {})
+  call prop_add(1, 1, #{type: 'textprop', length: 1})
+  let id = popup_create('TEST', #{textprop: 'textprop', highlight: 'ErrorMsg', tabpage: 1})
+  tab sp
+  call assert_equal(['textprop', 'textpropid', 'textpropwin'], popup_getoptions(id)->keys()->filter({_, v -> v =~ 'textprop'}))
+
+  tabclose
+  bwipe!
+  call prop_type_delete('textprop')
+endfunc
+
 " vim: shiftwidth=2 sts=2