Closed Bug 376746 Opened 18 years ago Closed 12 years ago

navigator.plugins.refresh(true) should only refresh pages with missing or out-of-date plugins

Categories

(Core Graveyard :: Plug-ins, defect, P3)

x86
Windows XP
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 418615

People

(Reporter: george, Unassigned)

References

()

Details

(Keywords: helpwanted, Whiteboard: [mentor=bsmedberg][lang=c++/JS])

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 A website that calls navigator.plugins.refresh(true) repeatedly with a short delay between each call can prevent the user from entering a URL into the location bar. This appears to occur because navigator.plugins.refresh(true) resets the value in the location bar when it is called, thereby removing any input that the user had begun to enter. Reproducible: Always Steps to Reproduce: 1. Open a page that calls navigator.plugins.refresh(true) repeatedly with a short delay (Example link provided) 2. Attempt to enter a new value into the Firefox location bar Actual Results: Value of location bar is reset to current page each time navigator.plugins.refresh(true) is called. Expected Results: navigator.plugins.refresh(true) should not reset value in location bar.
Component: General → Plug-ins
Product: Firefox → Core
QA Contact: general → plugins
Found this during triage... I'd really like somebody to try and reproduce/write a testcase, since I don't really understand why plugins.refresh would affect the location bar at all.
Keywords: qawanted
Priority: -- → P3
It looks like the initial link is no longer valid. I can't provide a testcase right now, but I've noticed this: 1. Open http://livescore.com/ 2. Enter something in the location bar 3. Wait 2 min until the scores are updated AR: location bar value is reset
That happens with plugins disabled too, looks like the page just periodically reloads instead of dynamically updating.
Yeah, comment 2 is unrelated to the original bug here.
I tried to reproduce by opening a random page and using Scratchpad (shift+F4) to call navigator.plugins.refresh(true) on it. What actually happens is that this call causes the page to be reloaded (not sure whether this is expected or not). Anyway, if done repeatedly, this does cause the location bar to be unusable as an obvious side effect. Does the bug need to be morphed into "navigator.plugins.refresh(true) causes a page refresh"?
Well... navigator.plugins.refresh(true) *should* cause a page refresh under the following conditions: * there is a plugin on the page * which previously could not be loaded because there was a missing plugin, and we now found a plugin present * OR we found a new version of a plugin on the page I bet we get that wrong somehow, and it's a bitch to write automated tests for this.
(In reply to Benjamin Smedberg [:bsmedberg] from comment #6) > Well... navigator.plugins.refresh(true) *should* cause a page refresh under > the following conditions: > > * there is a plugin on the page There was no plugin content on the page I tested, hence there's definitely some wrong shortcut we're taking here.
Yep, we definitely shouldn't be doing that. helpwanted
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: qawantedhelpwanted
Summary: navigator.plugins.refresh(true) interrupts url input → navigator.plugins.refresh(true) should only refresh pages with missing or out-of-date plugins
Whiteboard: [mentor=bsmedberg][lang=c++/JS]
Closely related to bug 418615, we reload the current page regardless of plugins having changed, and it doesn't look like we ever reload other pages...
Assignee: nobody → jschoenick
Status: NEW → ASSIGNED
This is still on my radar, but I'm not sure when I'll get to it
Assignee: jschoenick → nobody
Status: ASSIGNED → NEW
Looking at this and bug 418615, it's clear that this code needs to be rewritten anyway, so I'm going to dupe this -- fixing the existing code in place isn't worthwhile.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.