react-new-window icon indicating copy to clipboard operation
react-new-window copied to clipboard

Window features are ignored

Open MidnightJava opened this issue 6 years ago • 7 comments

I can't find any way to set window features. I submit an object as the features property, and none of the mappings in that object are set as window features. That includes numeric values, like left or top, and boolean values like titlebar or scrollbars (I tried a boolean value and also string "yes/no"). I also tried setting the name property to "_blank" or leaving it out, since the JS API says strWindowFeatures will be ignored if opening an existing window. No matter what I do, all window features are ignored. EDIT: I found that width and height features are respected. But no others AFAICT.

MidnightJava avatar Oct 04 '19 15:10 MidnightJava

Same here. Great library with little tweaks

zning avatar Oct 24 '19 22:10 zning

Same here. Do you have an issue ?

dimitridumont avatar Dec 17 '19 08:12 dimitridumont

So this issue likely because most modern browsers override window features by default (due to potential security risks), not an issue with the library.

See here in the Mozilla docs for more details

DerekSteinke avatar Aug 17 '20 16:08 DerekSteinke

Thanks for your reply. In that case, there is at least an issue with the library's API, correct? I was trying to do what the API said I could do, and it was silently ignored. If most modern browsers override this behavior, then perhaps it should be removed from the API. Or at least a note should be added saying that this will not work on most browsers.

MidnightJava avatar Aug 17 '20 17:08 MidnightJava

I agree completely. At the least, a note in the docs should be included to make users aware of likely compatibility issues. I think there could still some cases where Window features are usable; like native applications running browser engines (stuff like Electron app). Even then, I'd think there are better options.

DerekSteinke avatar Aug 17 '20 18:08 DerekSteinke

Will improve the docs with all your suggestion. Thank you all for the valuable discussion. Also, I apologize for the long reply.

rmariuzzo avatar Nov 27 '22 05:11 rmariuzzo