Closed Bug 1398456 Opened 7 years ago Closed 7 years ago

Pressing Enter key in text input in Popup window (browser_action) closes the popup

Categories

(WebExtensions :: Frontend, defect)

56 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1384078

People

(Reporter: juraj.masiar, Unassigned)

Details

Attachments

(1 file)

7.94 KB, application/x-zip-compressed
Details
Attached file broken_popup.zip
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
Build ID: 20170907194642

Steps to reproduce:

1) install extension "broken_popup"
2) open popup (browser_action)
3) focus input box
4) press 'Enter' key

Broken in Beta 56.0b10 (64-bit) and Alfa. Working in 55.0.2 (64-bit).


Actual results:

Popup closes.


Expected results:

1) Popup should stay opened.
2) Url should be updated to https://fastaddons.com

JavaScript:
const byId = id => document.getElementById(id);
document.addEventListener('DOMContentLoaded', init);
function init() {
  byId('only_input').onkeydown = e => {
    e.preventDefault();
    e.stopImmediatePropagation();
    chrome.tabs.update({url: 'https://fastaddons.com/'})
  };
}
Component: Untriaged → WebExtensions: Frontend
Product: Firefox → Toolkit
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: