Closed Bug 113146 Opened 23 years ago Closed 22 years ago

Pressing enter in bookmark comments textbox closes dialog

Categories

(SeaMonkey :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Future

People

(Reporter: neil, Assigned: bugs)

References

Details

If I click on a bookmark and select properties, then go to the comments textbox and press enter to go to the 2nd line, it adds a carrage return and then closes the dialog box on me.
<dialog/> trouble, I bet
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Hardware: PC → All
pressing enter after typing a line is a bad habit. you can keep typing in the textbox to get more than one sentence.
mass reassign of pchen bookmark bugs to ben
Assignee: pchen → ben
Status: NEW → ASSIGNED
Target Milestone: --- → Future
*** Bug 130435 has been marked as a duplicate of this bug. ***
*** Bug 147158 has been marked as a duplicate of this bug. ***
*** Bug 147253 has been marked as a duplicate of this bug. ***
*** Bug 159768 has been marked as a duplicate of this bug. ***
The event shouldn't be handled by both the editbox and the dialog. The editbox should get it first, indicate that it has consumed the event (by making a sufficiently appropriate response to it - inserting a new line), and that is where the event handling should stop. What is actually happening is either the event being passed back up the widget heirachy (dialog -> info tab -> editbox) until it reaches the dialog widget after the editbox handles it, or the event is being passed to both the dialog and the editbox at the same time to begin with. Is this problem then specifically with code in the bookmark properties dialog, or rather an incantation of a logic error within the widget library? The above is just some random thoughts I had WRT this bug during my maths lecture this afternoon. They should be taken with a grain of salt since I don't have any understanding of what is actually going on (though this seems pretty reasonable), but they could provide a bit of insight for a solution and also a much greater bug (the semi-described logic one). If someone can comment as to what is actually happening as far as event handling is concerned (i.e. do all events automatically get passed to the currently focused widget and all their parents?) I'd be interested to hear it.
See http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-flow which describes what happens with the keypress event. Yes, the textbox should be cancelling the event to prevent it from bubbling up to the window....
*** Bug 161840 has been marked as a duplicate of this bug. ***
*** Bug 170120 has been marked as a duplicate of this bug. ***
This is a XUL bug, not a bookmarks bug. It affects more applications than just bookmarks (or, at least hopefully the solution will fix it for more than just bookmarks)
As a workaround: add this to your textbox: onkeypress="event.stopPropagation()"
I think this bug is indeed an XUL bug, that I know where the problem is and how to fix it. See bug 197568.
Depends on: 197568
I should have duped bug 197568 to this bug. Attachment 117354 [details] [diff] in that bug needs r=/sr=. Who should I ask for that from? That patch should fix this bug.
I believe fixing bug 197568 means this bug is fixed. Awaiting verification. (Or someone to tell me I'm wrong.) Per comment 9, if we ever get event handling done right, we should probably back out the patch to bug 197568 as bloat. (In the unscheduled future, jkeiser may one day redo events in Mozilla, but that is not for certain.)
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.