Filepicker can't select a file on Windows 8, IE 10 - internet-explorer-10

I have defined a filepicker widget like this:
<input type="filepicker" data-fp-apikey="--" data-fp-mimetypes="image/jpg, image/jpeg, application/pdf" data-fp-container="modal" data-fp-multiple="true" onchange="on_file_picker_change(event,)" data-fp-button-text="Browse for files">
This is working fine on the Mac with Chrome, Safari and Firefox. It also works fine on Windows 8 with Firefox. However it isn't working on Windows 8 with IE10. Drag and drop doesn't work at all, and clicking on "Choose a file" bring up the file browser but the "Files of type" field is marked "Any File (undefinedundefinedundefined)", and choosing a file of the type my widget allows is not possible.
Any clues as to what the problem might be? I have not tested with other versions of IE.

Related

PDF.JS printing from Chrome broken (Odoo 13 Docker)

I'm using Odoo 13 in Docker. When viewing a PDF preview using PDF.JS (such as work instructions on a work order) there is no print button when using a Chrome-based browser, and pressing ctrl+p shows the error message "Warning: Printing is not fully supported by this browser." There is also a "More Information" button, which when pressed displays "PDF.js v? (build: ?)." Printing, both with ctrl+p and with the print button, works as expected in Firefox.
I found the following open Github issue, though it's for Odoo 12: https://github.com/odoo/odoo/issues/27668
I tried upgrading my version of PDF.JS by essentially copying this PR: https://github.com/odoo/odoo/pull/49457 I made sure to restart Odoo, upgrade the web module & regenerate assets bundles, but neither of the versions I tried (2.2.228 & 2.9.359) behaved any differently.
I also tried the following snippet of code from the bottom of that Github issue:
<templates>
<t t-extend="DocumentViewer.Content">
<t t-jquery="iframe.o_viewer_pdf" t-operation="replace">
<iframe class="mb48 o_viewer_pdf" t-if="widget.activeAttachment.type == 'application/pdf'" t-attf-src="/web/content/#{widget.activeAttachment.id}" />
</t>
</t>
</templates>
According to the user who posted it, this code is supposed to override PDF.JS and use the browser's default PDF viewer. I tried putting this code in an XML file in a custom module (tried loading it both as 'data' & 'qweb' from manifest.py), but saw no effects.
If anyone has faced this issue before, or just has any ideas I haven't tried, I would greatly appreciate some help!

Cannot Download PDF's Using Selenium/Python 3.x, But It works When I do it Manually

I read through a ton of answers to this query of mine but couldn't find anything specific. Hence asking here
Here's the scenario, On a webpage, when I click a download button, it downloads a PDF file correctly, On the browser, I have set the Firefox preferences to save the file rather than open in preview.
However, when I run my selenium/Python script, the download keeps opening in the preview, there are other PDF downloads on the page and they work fine. Upon inspecting both the download buttons, the only difference I see is the one that does not download has a relative URL in its href value.
I am also using the following firefox options settings in my script, but with no help. Please guide me in the right direction. Thanks in advance!
**************************
fp = webdriver.FirefoxProfile()
fp.set_preference("browser.download.folderList", 2)
fp.set_preference("browser.download.manager.showWhenStarting", False)
fp.set_preference("browser.download.dir", 'Path to Save The file')
fp.set_preference("pdfjs.enabledCache.state", False)
fp.set_preference("browser.helperApps.neverAsk.saveToDisk", "application/pdf")
fp.set_preference("pdfjs.disabled", "true")
# disable Adobe Acrobat PDF preview plugin
fp.set_preference("plugin.scan.plid.all", "false")
fp.set_preference("plugin.scan.Acrobat", "99.0")
self.driver = webdriver.Firefox(firefox_profile=fp,executable_path="path to my geckodriver")
self.driver.get("url")
I had the same problem - setting to disable pdfjs only worked when clicked manually on about:config page. Turned out that what seems to have solved the issue was (Firefox 60.6.1ESR):
profile.setPreference("pdfjs.disabled", true);
profile.setPreference("pdfjs.enabledCache.state", false); // <= THIS

Changing background-image property to a local image file using Safari Extension

(MacBook Pro Mid 2015 / OS X Yosemite 10.10.5 / Safari 8.0.8)
I want to change background-image of a particular webpage.
I made a Safari Extension and make such a css file as style.css
body { background-image: url('background.png'); }
I also put background.png to the same directory with style.css
And Safari Developer license is already set.
Then, in Extension Builder, I set some properties as follows:
Extension Website Access: All
Injected Extension Content:
Style Sheets: style.css
Whitelist: http://__mywebsite__.com/*
Although I installed this, background of my webpage didn't seem to be enabled.
I think the solution must be these:
Safari Extension can't find a local file background.png
I set wrong whitelist pattern
I set wrong parameter to Extension Website Access
What should I do? Any comments would be thankful.
What happens if you link to an image on a web page, does it work? try putting this link in and see if it works: http://dummyimage.com/600x400/000/fff
If it does then the problem is with the directory or one of the other things you mentioned

When an mht file is opened in IE11 , mode is getting changed IE7(default)

Any .mht file opened using IE11, the mode is getting changed to default IE 7(this has been observed using F12-> Developer Tools).
This problem exists with only IE11, I have tried in IE9 and .mht files are working fine.
1. Is this a known issue?
2. why the mode set to IE7(default), when IE11 is used?
Would you please provide any workaround to make sure that its always set IE mode to latest(edge).
Regards,
Syam Devendla

Javascript window.open(xxx, "download") creates a blank page while download prompt

When I run window.open(file, "download") with safari, it opens a blank page while download prompt and the blank page stays there. I notice firefox opens a blank tab but it's close when download starts. Is there another javascript command/function that will work so there's no blank page opened in Safari?
Why don't you use window.location = file instead?
Redirecting to the file leads to the same behavior as clicking on a link to that file: you get the download prompt, and the browser stays on the current page!
Call window.open like this (it works in all major browsers):
window.open(file, '_parent', 'download');