New issue
Advanced search Search tips

Issue 646381 link

Starred by 3 users

Issue metadata

Status: Archived
Owner: ----
Closed: Oct 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

DOM modified on popup not on main window

Reported by siim.val...@sorryasaservice.com, Sep 13 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/52.0.2743.116 Chrome/52.0.2743.116 Safari/537.36

Steps to reproduce the problem:
1. Add extension from extension directory of that project to extensions
2. Open sampleHtml.html from samplePage directory

What is the expected behavior?
Chrome extension should append a heading with text "MY SUPER AWESOME HEADING" to main window.

What went wrong?
Since on page load a popup is opened, the heading is appended to popup DOM instead of main window DOM.

WebStore page: https://github.com/siimval/chrome-ext-popup-bug

Did this work before? N/A 

Chrome version: 52.0.2743.116  Channel: n/a
OS Version: Ubuntu 16.04
Flash Version: Shockwave Flash 21.0 r0
 

Comment 1 by woxxom@gmail.com, Oct 20 2016

1. Your extension waits for the current tab to load completely (the opened popup is the new active tab)
2. Then it injects the script into an active tab (that is the just opened popup) because "null" is used in executeScript

Thus, the behavior you observe is expected.

You should pass "tabId" from chrome.tabs.onUpdated.addListener into the callback so that the callback uses this tabId as the first parameter of executeScript.
Project Member

Comment 2 by sheriffbot@chromium.org, Oct 20 2017

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment