Closed
Bug 280895
Opened 20 years ago
Closed 17 years ago
javascript alert are not modal when input element exists
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 290862
People
(Reporter: nian.liu, Unassigned)
Details
Attachments
(2 files, 2 obsolete files)
514 bytes,
text/html
|
Details | |
3.44 KB,
patch
|
Details | Diff | Splinter Review |
1.open test case 2.input in textbox and alert will pop up 3.focus on textbox and continue input, alert can still pop up expect result: user should have no chance to input in textbox when javascript alert pops up
Reporter | ||
Comment 1•20 years ago
|
||
Comment 2•20 years ago
|
||
This worksforme in a 2005-01-25-06 build -- once the alert comes up, I can't type anymore. Reporter, what build are you using?
Reporter | ||
Comment 3•20 years ago
|
||
I use Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050204. This is for Linux only. And to reprocude it, the key step is that use mouse click to focus on textbox after alert pops up, then use keyboard to input in textbox
Comment 4•20 years ago
|
||
Well, I'm testing this in a Linux GTK1 2005-02-09-05 nightly build, and I'm definitely clicking in the textbox. I can't reproduce the bug. Are you using a GTK2 build, or GTK1 build?
Reporter | ||
Comment 5•20 years ago
|
||
GTK2 build. Thanks.
Comment 6•20 years ago
|
||
Hmm.... I just tested a GTK2 Firefox build, and it works there too....
Reporter | ||
Comment 7•20 years ago
|
||
my config switch --enable-optimize --enable-xft --disable-freetype2 --disable-tests --enable-debug --with-xprint --enable-xinerama --enable-ldap --enable-crypto --enable-x11-shm --disable-gtktest --disable-glibtest --disable-libIDLtest --disable-auto-deps --enable-ctl --enable-default-toolkit=gtk2 --enable-ldap-experimental --enable-extensions=default,sroaming --enable-application=suite
Reporter | ||
Comment 8•20 years ago
|
||
And I can reproduce it on my firefox based on GTK2 which is checked out on Tue Jan 18 17:42:58 CST 2005
Reporter | ||
Comment 9•20 years ago
|
||
Reporter | ||
Comment 10•20 years ago
|
||
I use GTK2.4.9
Reporter | ||
Updated•19 years ago
|
Attachment #174560 -
Flags: review?(bzbarsky)
Comment 11•19 years ago
|
||
Comment on attachment 174560 [details] [diff] [review] patch I'm sorry, but I can't review this. I'm not a module owner for this code, and I don't even know what it's doing... Please request review from the module owner or peer.
Attachment #174560 -
Flags: review?(bzbarsky)
Reporter | ||
Updated•19 years ago
|
Attachment #174560 -
Flags: review?(blizzard)
Comment 12•19 years ago
|
||
This is pretty sensitive code. Focus handling is pretty fragile. I suspect that this needs to walk up the widget chain and make sure that it's a child of the grab widget, not just the grab widget. Bryner, any ideas since you've looked at focus code too?
Reporter | ||
Comment 13•19 years ago
|
||
Blizzard, do you think it's really a Mozilla bug or a potential GTK bug?
Comment 14•19 years ago
|
||
Probably a mozilla bug.
Reporter | ||
Comment 15•19 years ago
|
||
How about this one? make sure widget not in the child chain of grabWidget
Attachment #174560 -
Attachment is obsolete: true
Attachment #175274 -
Flags: review?(blizzard)
Reporter | ||
Comment 16•19 years ago
|
||
Blizzard, please...
Reporter | ||
Updated•19 years ago
|
Attachment #175274 -
Flags: superreview?(blizzard)
Reporter | ||
Updated•19 years ago
|
Attachment #175274 -
Attachment is obsolete: true
Attachment #175274 -
Flags: superreview?(blizzard)
Attachment #175274 -
Flags: superreview?
Attachment #175274 -
Flags: review?(blizzard)
Attachment #175274 -
Flags: review?
Reporter | ||
Updated•19 years ago
|
Summary: javascript alert are not modal when textbox exists → javascript alert are not modal when input element exists
Reporter | ||
Updated•19 years ago
|
Flags: review?(blizzard)
Product: Mozilla Application Suite → Firefox
Reporter | ||
Updated•19 years ago
|
Component: General → Widget: Gtk
Product: Firefox → Core
Reporter | ||
Comment 17•19 years ago
|
||
both GTK2 and Mozilla needs to modify the code to fix this bug. For GTK2, grab with group should be implemented For Mozilla, grab condition judge should be done in OnContainerFocusInEvent
Reporter | ||
Comment 18•19 years ago
|
||
Reporter | ||
Updated•19 years ago
|
Attachment #183135 -
Flags: review?(bryner)
Comment 19•19 years ago
|
||
Isn't the problem simply that the alert dialog isn't being placed into the grab group of the parent browser window? (The patch seems to try to emulate modality by ignoring focus in when there is a grab in effect, but this isn't right.) This may be related to: http://bugzilla.gnome.org/show_bug.cgi?id=69934 which is a request for global grabs that span the whole application. It should be simple to get things right when there is only one browser window, which is the normal case. In the multiple browser window case, it's going to be harder... Mozilla *could* emulate global grabs by grabbing in each separate grab group.
Reporter | ||
Comment 20•19 years ago
|
||
(In reply to comment #19) > Isn't the problem simply that the alert dialog isn't being placed into > the grab group of the parent browser window? > from nsWindow::NativeCreate, popop is added into same window group of browser window if (parentArea) { nsWindow *parentnsWindow = get_window_for_gdk_window(parentArea->inner_window); NS_ASSERTION(parentnsWindow, "no nsWindow for parentArea!"); if (parentnsWindow && parentnsWindow->mWindowGroup) { gtk_window_group_add_window(parentnsWindow->mWindowGroup, GTK_WINDOW(mShell)); // store this in case any children are created mWindowGroup = parentnsWindow->mWindowGroup; LOG(("adding window %p to group %p\n", (void *)mShell, (void *)mWindowGroup)); } } For the gtk_grab_get_current error, it shows in nsWindow::SetModal if you add a gtk_grab_get_current just after gtk_grab_add. Once gtk_grab_add is called, gtk_grab_get_current returns null.
Reporter | ||
Comment 21•19 years ago
|
||
owen, any more comments?
Comment 22•18 years ago
|
||
Comment on attachment 183135 [details] [diff] [review] patch This user does not exist anymore in Bugzilla. bryner's current bugmail is bryner@b (just enter it in the review field). Make sure the patch is against trunk so, this patch looks like it was diffed against Mozilla 1.7.
Attachment #183135 -
Flags: review?(deleteduser189766)
Updated•17 years ago
|
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Updated•16 years ago
|
Attachment #175274 -
Flags: superreview?
Attachment #175274 -
Flags: review?
You need to log in
before you can comment on or make changes to this bug.
Description
•