Opened 8 years ago

Closed 8 years ago

#12975 closed defect (fixed)

Regression -- Popup Window of "href" of ListItem is Blocked by Chrome

Reported by: Ming Zhe Huang Owned by: Dustin Machi
Priority: high Milestone: 1.7
Component: DojoX Mobile Version: 1.6.1
Keywords: regression Cc:
Blocked By: Blocking:

Description

This should be another regression after the change in transition... Please see the attached HTML. If you open it in Chrome/Safari?, clicking "Test" will NOT show the popup window. Instead, the popup window is blocked by the browser. I've tried non-webkit browsers, including IE9, FF4, Opera. All of them allow the popup window. Some investigation indicates that this should be due to the refactoring of transition. Now we're using ViewController? to handle the transition event. It's a global event handler. However, it seems that Webkit will block popup window if it's triggered in global scope. I tried to pop up the window in the click handler of ListItem? and it works.

Attachments (2)

test_ListItemHref.html (1.5 KB) - added by Ming Zhe Huang 8 years ago.
test case for reproduce
fix-hreftarget-block.patch (3.6 KB) - added by Ming Zhe Huang 8 years ago.
proposed patch

Download all attachments as: .zip

Change History (8)

Changed 8 years ago by Ming Zhe Huang

Attachment: test_ListItemHref.html added

test case for reproduce

comment:1 Changed 8 years ago by ykami

Milestone: tbd1.7
Owner: changed from ykami to Dustin Machi
Priority: normalhigh

dmachi, please take a look. I have no idea if simply moving it back to ListItem can be a solution.

comment:2 Changed 8 years ago by Douglas Hays

It seems that when TransitionEvent? calls on.emit which then calls dispatchEvent, the new event handler runs in a separate call stack and thus userGestureEvent is returning false. Calling window.open from TransitionEvent? works fine. I think ViewController? would have to queue onStartTransition actions back to the original event handler to be executed after on.emit returns, which is really ugly.

Changed 8 years ago by Ming Zhe Huang

Attachment: fix-hreftarget-block.patch added

proposed patch

comment:3 Changed 8 years ago by Ming Zhe Huang

Please see the proposed patch. I pull the window popping-up logic back to where it should be, because it's NOT related to any kind of Transition.

comment:4 Changed 8 years ago by Ming Zhe Huang

By the way, test_iPhone-SwapView?-demo.html and test_iPhone-SwapView?-demo-async.html can be used to verify the fix on ListItem?.

I altered test_iPhone-Icon.html to verify the fix on IconItem?.

comment:5 Changed 8 years ago by Dustin Machi

Status: newassigned

The patches do work, though I'm not sure why you wouldnt' consider this as related to a transition. Seems like that is exactly what it is doing here, but for today at least these patches are probably simplest fix...though I'm not sure its the correct way yet. I'll apply these patches and then take a look at this issue again for 1.8.

comment:6 Changed 8 years ago by Dmachi

Resolution: fixed
Status: assignedclosed

In [26635]:

appled patch for popup window in Fixes #12975 . !strict

Note: See TracTickets for help on using tickets.