From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: HTML-Info design Date: Wed, 4 Mar 2015 18:51:46 +0600 Message-ID: References: <87sig6xech.fsf@ferrier.me.uk> <83fvc5ni0u.fsf@gnu.org> <87k31fwwyv.fsf@ferrier.me.uk> <87bnmq9ibf.fsf@ferrier.me.uk> <87lhlrx5fc.fsf@building.gnus.org> <877fxb9821.fsf@ferrier.me.uk> <878uhrg6uu.fsf@building.gnus.org> <871tnj90lt.fsf@ferrier.me.uk> <87mw67elgf.fsf@building.gnus.org> <86bnmn1rwk.fsf@dod.no> <87wq5awwla.fsf@zigzag.favinet> <87d24wtf0o.fsf@zigzag.favinet> <87pp8r1fka.fsf@newcastle.ac.uk> <878uff1du7.fsf@newcastle.ac.uk> <87sidlrm4a.fsf@newcastle.ac.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1425473565 28705 80.91.229.3 (4 Mar 2015 12:52:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Mar 2015 12:52:45 +0000 (UTC) Cc: Emacs developers To: Phillip Lord Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 04 13:52:38 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YT8ms-0007hX-5n for ged-emacs-devel@m.gmane.org; Wed, 04 Mar 2015 13:52:30 +0100 Original-Received: from localhost ([::1]:43636 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YT8mr-0001iU-Hd for ged-emacs-devel@m.gmane.org; Wed, 04 Mar 2015 07:52:29 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33555) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YT8ma-0001cx-L2 for emacs-devel@gnu.org; Wed, 04 Mar 2015 07:52:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YT8mV-0005NN-RU for emacs-devel@gnu.org; Wed, 04 Mar 2015 07:52:12 -0500 Original-Received: from mail-ig0-x236.google.com ([2607:f8b0:4001:c05::236]:35469) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YT8mV-0005NA-LQ for emacs-devel@gnu.org; Wed, 04 Mar 2015 07:52:07 -0500 Original-Received: by igqa13 with SMTP id a13so36205136igq.0 for ; Wed, 04 Mar 2015 04:52:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=HijawgLytyYVGdrIW7KV40c2tsiFC6m2N9u9UiMh1bk=; b=fBXPZIims4IcUGswCwEo+iY0Unsl//R0cJCTNUSsF35z8UCoUdeUa9jqa0UOsD3AF8 caqaWd6B2jz8d+chsVK7neIRiBBb89rFe8qW2dCV3upnkXpHkoiHC7qPWcTTcuSfpBrN 6wFkbDFSfbR136YN7/okSDOg6Fi13hewe6vSpZ9Dn3ZYiCUzSBX49qP82Lf2+xVqIQ4h RllLlZd3o00ZneNsnYCFZb4vrff/FSpLqWLweZSktloiOlpStM6yporaIbU0lzJlLbuL qOm1EL1meDSnY8V4LfriO8nXM4r+nAx19xZk+qkQWpbQv24VG1YPebaKPdHbIpv8NNI8 4U5g== X-Received: by 10.50.114.4 with SMTP id jc4mr37015255igb.14.1425473526682; Wed, 04 Mar 2015 04:52:06 -0800 (PST) Original-Received: by 10.107.48.193 with HTTP; Wed, 4 Mar 2015 04:51:46 -0800 (PST) In-Reply-To: <87sidlrm4a.fsf@newcastle.ac.uk> X-Google-Sender-Auth: PfHcIjqM9ayDCRA3NFX4C7CBgtg X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c05::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183636 Archived-At: On Wed, Mar 4, 2015 at 6:19 PM, Phillip Lord wrote: > Okay. Not seen that before. org-info uses single keypresses for > next/prev, to enable search or occur functionality. What are you seeing, > and what you be expecting it to do? I'm not sure how the org-info > functionality could NOT conflict with this sort of find-as-you-type > functionality. OK, here=E2=80=99s a formal bug report. The conflict can be avoided if the event handler notifies the browser that it has handled the event, as detailed below. =3D=3D=3D Versions: * Firefox 35.0.1 on Ubuntu 14.04 x86_64 * http://orgmode.org/org-info.js as retrieved from the origin server on 2015-03-04 To reproduce: 0. In the Firefox Preferences dialog, Advanced | General tab, Accessibility section, check the checkbox [x] Search for text when I start typing. 1. Open the page http://homepages.cs.ncl.ac.uk/phillip.lord/lentic/lenticular.html * Observed behavior: The node(?) =E2=80=9C1 Introduction=E2=80=9D is di= splayed. 2. Press =E2=80=9Cn=E2=80=9D. * Expected behavior: 1. The original node is hidden. 2. The next node is displayed. 3. No other activity happens. * Observed behavior: 1. The original node is hidden, as expected. 2. The next node (1.1 Caveat) is displayed, as expected. 3. Find-as-you-type is activated with the search text set to the single character =E2=80=9Cn=E2=80=9D, finding the character= =E2=80=9Cn=E2=80=9D in =E2=80=9CLe[n]ticular Text For Emacs=E2=80=9D. 3. Wait until the search bar times out, or press ESC to dismiss it. 4. Press =E2=80=9Cp=E2=80=9D. * Expected behavior: 1. The current node is hidden. 2. The previous node (1 Introduction) is displayed. 3. No other activity happens. * Observed behavior: 1. The node (1.1 Caveat) is hidden, as expected. 2. The next node (1 Introduction) is displayed, as expected. 3. Find-as-you-type is activated with the search text set to the single character =E2=80=9Cp=E2=80=9D, finding the character= =E2=80=9CP=E2=80=9D in =E2=80=9CHELP=E2=80=9D. Cause: The event handler function, OrgHtmlManagerKeyEvent, receives an event object as its argument b. It analyzes this object and performs any actions associated with the pressed key (or does nothing if the key is not recognized). The browser then also analyzes the object, notices that default handling has not been prevented, and applies the default handling, which is to start a search within the page. To prevent the default handling, the handler function is supposed to invoke the preventDefault() method on the event object, or cause that method to be invoked by other functions involved in the handling (namely, org_html_manager.getKey()), when and only when the event represents a key known to the handler. References: * https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault * http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Event-preventD= efault =3D=3D=3D